aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-01-19 01:02:03 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:19 +0800
commitd009b5b36522a8b4d29e8d199dc7a32159c34edd (patch)
treeef88272b61ff617e61d858db6aa1693d8f0134e6
parent59b03835d76efaf3697d1fa33967874cc4a86556 (diff)
downloadgsoc2013-evolution-d009b5b36522a8b4d29e8d199dc7a32159c34edd.tar
gsoc2013-evolution-d009b5b36522a8b4d29e8d199dc7a32159c34edd.tar.gz
gsoc2013-evolution-d009b5b36522a8b4d29e8d199dc7a32159c34edd.tar.bz2
gsoc2013-evolution-d009b5b36522a8b4d29e8d199dc7a32159c34edd.tar.lz
gsoc2013-evolution-d009b5b36522a8b4d29e8d199dc7a32159c34edd.tar.xz
gsoc2013-evolution-d009b5b36522a8b4d29e8d199dc7a32159c34edd.tar.zst
gsoc2013-evolution-d009b5b36522a8b4d29e8d199dc7a32159c34edd.zip
Bug #633788 - Mail plugin's update-actions handler is never called
-rw-r--r--modules/mail/e-mail-shell-view-private.c19
-rw-r--r--plugins/mailing-list-actions/mailing-list-actions.c3
2 files changed, 21 insertions, 1 deletions
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index a4e74c32ad..6a15f4ed07 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -387,6 +387,20 @@ mail_shell_view_reader_changed_cb (EMailShellView *mail_shell_view,
}
static void
+mail_shell_view_reader_update_actions_cb (EMailReader *reader,
+ guint32 state,
+ EMailShellView *mail_shell_view)
+{
+ EMailShellContent *mail_shell_content;
+
+ g_return_if_fail (mail_shell_view != NULL);
+ g_return_if_fail (mail_shell_view->priv != NULL);
+
+ mail_shell_content = mail_shell_view->priv->mail_shell_content;
+ e_mail_reader_update_actions (E_MAIL_READER (mail_shell_content), state);
+}
+
+static void
mail_shell_view_prepare_for_quit_done_cb (CamelFolder *folder,
gpointer user_data)
{
@@ -608,6 +622,11 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
mail_shell_view, G_CONNECT_SWAPPED);
g_signal_connect_object (
+ e_mail_shell_content_get_mail_view (mail_shell_content), "update-actions",
+ G_CALLBACK (mail_shell_view_reader_update_actions_cb),
+ mail_shell_view, 0);
+
+ g_signal_connect_object (
reader, "folder-loaded",
G_CALLBACK (e_mail_view_update_view_instance),
mail_view, G_CONNECT_SWAPPED);
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c
index fd3ae6c0fa..8090c21063 100644
--- a/plugins/mailing-list-actions/mailing-list-actions.c
+++ b/plugins/mailing-list-actions/mailing-list-actions.c
@@ -348,7 +348,8 @@ update_actions_cb (EMailReader *reader,
{
gboolean sensitive;
- sensitive = (state & E_MAIL_READER_SELECTION_IS_MAILING_LIST);
+ sensitive = (state & E_MAIL_READER_SELECTION_IS_MAILING_LIST) != 0
+ && (state & E_MAIL_READER_SELECTION_SINGLE) != 0;
gtk_action_group_set_sensitive (action_group, sensitive);
}