aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-task-shell-sidebar.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-11-14 23:39:55 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-14 23:42:02 +0800
commitbb1653f64c0998f3c90d9cf0e7a2183dccd4611f (patch)
treeb1419804cd5af877df35c2a2293fb23a58ce5cfd /modules/calendar/e-task-shell-sidebar.c
parente1815361e0a7dc69f5d06a4d623e709eff611464 (diff)
downloadgsoc2013-evolution-bb1653f64c0998f3c90d9cf0e7a2183dccd4611f.tar
gsoc2013-evolution-bb1653f64c0998f3c90d9cf0e7a2183dccd4611f.tar.gz
gsoc2013-evolution-bb1653f64c0998f3c90d9cf0e7a2183dccd4611f.tar.bz2
gsoc2013-evolution-bb1653f64c0998f3c90d9cf0e7a2183dccd4611f.tar.lz
gsoc2013-evolution-bb1653f64c0998f3c90d9cf0e7a2183dccd4611f.tar.xz
gsoc2013-evolution-bb1653f64c0998f3c90d9cf0e7a2183dccd4611f.tar.zst
gsoc2013-evolution-bb1653f64c0998f3c90d9cf0e7a2183dccd4611f.zip
BugĀ 600397 - Delete option enabled for undeletable ESource
Diffstat (limited to 'modules/calendar/e-task-shell-sidebar.c')
-rw-r--r--modules/calendar/e-task-shell-sidebar.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index 6bd7700fcf..9107d65464 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -451,6 +451,7 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
ETaskShellSidebar *task_shell_sidebar;
ESourceSelector *selector;
ESource *source;
+ gboolean can_delete = FALSE;
gboolean is_system = FALSE;
guint32 state = 0;
@@ -460,13 +461,20 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
if (source != NULL) {
const gchar *uri;
+ const gchar *delete;
uri = e_source_peek_relative_uri (source);
is_system = (uri == NULL || strcmp (uri, "system") == 0);
+
+ can_delete = !is_system;
+ delete = e_source_get_property (source, "delete");
+ can_delete &= (delete == NULL || strcmp (delete, "no") != 0);
}
if (source != NULL)
state |= E_TASK_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE;
+ if (can_delete)
+ state |= E_TASK_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE;
if (is_system)
state |= E_TASK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM;