diff options
author | Milan Crha <mcrha@redhat.com> | 2009-11-30 15:01:31 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchenthill@novell.com> | 2009-11-30 15:01:31 +0800 |
commit | 0b1658ed7a215dad8295b02a30d5220011e199f1 (patch) | |
tree | f4e0b3727b468763adc3f63e9d15dab0e59a064a /modules/calendar/e-task-shell-sidebar.c | |
parent | b9f0119ef5fb0a575253f9e3f1d3a5107ebc47c7 (diff) | |
download | gsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.tar.gz gsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.tar.zst gsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.zip |
Bug 494394 - No way for the user to refresh a calendar
Diffstat (limited to 'modules/calendar/e-task-shell-sidebar.c')
-rw-r--r-- | modules/calendar/e-task-shell-sidebar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index 9107d65464..df3761f444 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -453,6 +453,7 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar) ESource *source; gboolean can_delete = FALSE; gboolean is_system = FALSE; + gboolean refresh_supported = FALSE; guint32 state = 0; task_shell_sidebar = E_TASK_SHELL_SIDEBAR (shell_sidebar); @@ -460,6 +461,7 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar) source = e_source_selector_peek_primary_selection (selector); if (source != NULL) { + ECal *client; const gchar *uri; const gchar *delete; @@ -469,6 +471,9 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar) can_delete = !is_system; delete = e_source_get_property (source, "delete"); can_delete &= (delete == NULL || strcmp (delete, "no") != 0); + + client = g_hash_table_lookup (task_shell_sidebar->priv->client_table, e_source_peek_uid (source)); + refresh_supported = client && e_cal_get_refresh_supported (client); } if (source != NULL) @@ -477,6 +482,8 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar) state |= E_TASK_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE; if (is_system) state |= E_TASK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM; + if (refresh_supported) + state |= E_TASK_SHELL_SIDEBAR_SOURCE_SUPPORTS_REFRESH; return state; } |