aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-memo-shell-sidebar.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-memo-shell-sidebar.c')
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index 6da89988c8..dee57e0d26 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -455,6 +455,7 @@ memo_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
ESource *source;
gboolean can_delete = FALSE;
gboolean is_system = FALSE;
+ gboolean refresh_supported = FALSE;
guint32 state = 0;
memo_shell_sidebar = E_MEMO_SHELL_SIDEBAR (shell_sidebar);
@@ -462,6 +463,7 @@ memo_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;
@@ -471,6 +473,9 @@ memo_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 (memo_shell_sidebar->priv->client_table, e_source_peek_uid (source));
+ refresh_supported = client && e_cal_get_refresh_supported (client);
}
if (source != NULL)
@@ -479,6 +484,8 @@ memo_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
state |= E_MEMO_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE;
if (is_system)
state |= E_MEMO_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM;
+ if (refresh_supported)
+ state |= E_MEMO_SHELL_SIDEBAR_SOURCE_SUPPORTS_REFRESH;
return state;
}