aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-sidebar.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-cal-shell-sidebar.c')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 244136ea0f..573299084a 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -510,6 +510,7 @@ cal_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
ESource *source;
gboolean can_delete = FALSE;
gboolean is_system = FALSE;
+ gboolean refresh_supported = FALSE;
guint32 state = 0;
cal_shell_sidebar = E_CAL_SHELL_SIDEBAR (shell_sidebar);
@@ -517,6 +518,7 @@ cal_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;
@@ -526,6 +528,9 @@ cal_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 (cal_shell_sidebar->priv->client_table, e_source_peek_uid (source));
+ refresh_supported = client && e_cal_get_refresh_supported (client);
}
if (source != NULL)
@@ -534,6 +539,8 @@ cal_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
state |= E_CAL_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE;
if (is_system)
state |= E_CAL_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM;
+ if (refresh_supported)
+ state |= E_CAL_SHELL_SIDEBAR_SOURCE_SUPPORTS_REFRESH;
return state;
}