From d6ce64dc1925f5efb9fdfbc503400b7def2e7cfb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 18 Jan 2011 18:02:03 +0100 Subject: Bug #633788 - Mail plugin's update-actions handler is never called --- modules/mail/e-mail-shell-view-private.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'modules/mail') 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 @@ -386,6 +386,20 @@ mail_shell_view_reader_changed_cb (EMailShellView *mail_shell_view, shell_taskbar, G_CONNECT_SWAPPED); } +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) @@ -607,6 +621,11 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view) G_CALLBACK (mail_shell_view_reader_changed_cb), 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), -- cgit