aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-sidebar.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-11-30 15:01:31 +0800
committerChenthill Palanisamy <pchenthill@novell.com>2009-11-30 15:01:31 +0800
commit0b1658ed7a215dad8295b02a30d5220011e199f1 (patch)
treef4e0b3727b468763adc3f63e9d15dab0e59a064a /modules/calendar/e-cal-shell-sidebar.c
parentb9f0119ef5fb0a575253f9e3f1d3a5107ebc47c7 (diff)
downloadgsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.tar
gsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.tar.gz
gsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.tar.bz2
gsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.tar.lz
gsoc2013-evolution-0b1658ed7a215dad8295b02a30d5220011e199f1.tar.xz
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-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;
}