aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-14 03:37:12 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-14 04:00:03 +0800
commit3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff (patch)
tree173d8c8619a817a2fae8bea469e0fad179b2f8a5 /modules/mail/e-mail-shell-view-actions.c
parent3f529345a9711a3462525619c024b8344f81e356 (diff)
downloadgsoc2013-evolution-3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff.tar
gsoc2013-evolution-3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff.tar.gz
gsoc2013-evolution-3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff.tar.bz2
gsoc2013-evolution-3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff.tar.lz
gsoc2013-evolution-3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff.tar.xz
gsoc2013-evolution-3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff.tar.zst
gsoc2013-evolution-3fbcc8ef800b2c0ef74fcdea17f6a1e5ec01cdff.zip
EShellBackend: Respond to EShell::prepare-for-quit signals.
Listen for "prepare-for-quit" signals from the shell and inhibit shutdown until all the activities we're tracking are finalized. Also, add a couple supporting functions: gboolean e_shell_backend_is_busy (EShellBackend *shell_backend); void e_shell_backend_cancel_all (EShellBackend *shell_backend); These will eventually replace mail_msg_active() and mail_cancel_all().
Diffstat (limited to 'modules/mail/e-mail-shell-view-actions.c')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 852edbd147..3c4871bffe 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -830,7 +830,21 @@ static void
action_mail_stop_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
+ EShellView *shell_view;
+ EShellBackend *shell_backend;
+
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
+
+ /* XXX There's some overlap here: activities submitted through
+ * the legacy MailMsg system might be cancelled twice, but
+ * it shouldn't cause problems. */
+
+ /* the old way */
mail_cancel_all ();
+
+ /* the new way */
+ e_shell_backend_cancel_all (shell_backend);
}
static void