From a69cbcd79aff01585620a12b378686d86c219ce9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 3 Oct 2010 09:39:10 -0400 Subject: Bug 510020 - Add "Manage Subscriptions" to store context menus --- modules/mail/e-mail-shell-view.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/mail/e-mail-shell-view.c') diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index 0e9a66c2ad..6b6b530b90 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -843,6 +843,7 @@ mail_shell_view_update_actions (EShellView *shell_view) gboolean folder_is_trash; gboolean folder_has_unread_rec = FALSE; gboolean folder_tree_and_message_list_agree = TRUE; + gboolean store_supports_subscriptions; gboolean have_enabled_account; /* Chain up to parent's update_actions() method. */ @@ -878,6 +879,8 @@ mail_shell_view_update_actions (EShellView *shell_view) (state & E_MAIL_SIDEBAR_FOLDER_IS_STORE); folder_is_trash = (state & E_MAIL_SIDEBAR_FOLDER_IS_TRASH); + store_supports_subscriptions = + (state & E_MAIL_SIDEBAR_STORE_SUPPORTS_SUBSCRIPTIONS); uri = em_folder_tree_get_selected_uri (folder_tree); if (uri != NULL) { @@ -985,6 +988,10 @@ mail_shell_view_update_actions (EShellView *shell_view) sensitive = folder_has_unread_rec && !folder_is_store; gtk_action_set_sensitive (action, sensitive); + action = ACTION (MAIL_MANAGE_SUBSCRIPTIONS); + sensitive = folder_is_store && store_supports_subscriptions; + gtk_action_set_sensitive (action, sensitive); + action = ACTION (MAIL_TOOLS_SUBSCRIPTIONS); sensitive = have_enabled_account; gtk_action_set_sensitive (action, sensitive); -- cgit v1.2.3