aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-12 23:26:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-12 23:26:47 +0800
commit78bf9d9d708dd255cc0966d64112aba56a4b2544 (patch)
tree99005ed153514c35d47a86482cad28b024c7ee50 /modules/mail
parenteb29179da623f9cf4abd663577395a085452ca18 (diff)
downloadgsoc2013-evolution-78bf9d9d708dd255cc0966d64112aba56a4b2544.tar
gsoc2013-evolution-78bf9d9d708dd255cc0966d64112aba56a4b2544.tar.gz
gsoc2013-evolution-78bf9d9d708dd255cc0966d64112aba56a4b2544.tar.bz2
gsoc2013-evolution-78bf9d9d708dd255cc0966d64112aba56a4b2544.tar.lz
gsoc2013-evolution-78bf9d9d708dd255cc0966d64112aba56a4b2544.tar.xz
gsoc2013-evolution-78bf9d9d708dd255cc0966d64112aba56a4b2544.tar.zst
gsoc2013-evolution-78bf9d9d708dd255cc0966d64112aba56a4b2544.zip
Bug 624128 - Folder -> Subscriptions is always enabled
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-shell-view.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 3bee268afb..f3b70433bf 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -785,6 +785,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 have_enabled_account;
/* Chain up to parent's update_actions() method. */
E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view);
@@ -795,7 +796,11 @@ mail_shell_view_update_actions (EShellView *shell_view)
mail_shell_content = mail_shell_view->priv->mail_shell_content;
reader = E_MAIL_READER (mail_shell_content);
- e_mail_reader_update_actions (reader);
+ state = e_mail_reader_check_state (reader);
+ e_mail_reader_update_actions (reader, state);
+
+ have_enabled_account =
+ (state & E_MAIL_READER_HAVE_ENABLED_ACCOUNT);
mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar;
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
@@ -857,6 +862,7 @@ mail_shell_view_update_actions (EShellView *shell_view)
g_free (uri);
}
+
action = ACTION (MAIL_ACCOUNT_DISABLE);
sensitive = (account != NULL) && folder_is_store;
if (account_is_groupwise)
@@ -920,6 +926,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_TOOLS_SUBSCRIPTIONS);
+ sensitive = have_enabled_account;
+ gtk_action_set_sensitive (action, sensitive);
+
e_mail_shell_view_update_popup_labels (mail_shell_view);
}