aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-task-shell-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-task-shell-view.c')
-rw-r--r--modules/calendar/e-task-shell-view.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c
index 6186df92d5..f7028f87d3 100644
--- a/modules/calendar/e-task-shell-view.c
+++ b/modules/calendar/e-task-shell-view.c
@@ -304,8 +304,9 @@ task_shell_view_update_actions (EShellView *shell_view)
gboolean any_tasks_selected;
gboolean has_primary_source;
gboolean multiple_tasks_selected;
- gboolean primary_source_is_removable;
gboolean primary_source_is_writable;
+ gboolean primary_source_is_removable;
+ gboolean primary_source_in_collection;
gboolean selection_has_url;
gboolean selection_is_assignable;
gboolean single_task_selected;
@@ -342,10 +343,12 @@ task_shell_view_update_actions (EShellView *shell_view)
has_primary_source =
(state & E_TASK_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE);
- primary_source_is_removable =
- (state & E_TASK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_REMOVABLE);
primary_source_is_writable =
(state & E_TASK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_WRITABLE);
+ primary_source_is_removable =
+ (state & E_TASK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_REMOVABLE);
+ primary_source_in_collection =
+ (state & E_TASK_SHELL_SIDEBAR_PRIMARY_SOURCE_IN_COLLECTION);
refresh_supported =
(state & E_TASK_SHELL_SIDEBAR_SOURCE_SUPPORTS_REFRESH);
@@ -392,7 +395,9 @@ task_shell_view_update_actions (EShellView *shell_view)
gtk_action_set_sensitive (action, sensitive);
action = ACTION (TASK_LIST_RENAME);
- sensitive = primary_source_is_writable;
+ sensitive =
+ primary_source_is_writable &&
+ !primary_source_in_collection;
gtk_action_set_sensitive (action, sensitive);
action = ACTION (TASK_MARK_COMPLETE);