diff options
author | Milan Crha <mcrha@redhat.com> | 2011-08-15 23:32:20 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:49 +0800 |
commit | 352108b2ef5a7da0d1a30e99b039b87d05731b5e (patch) | |
tree | 9471f9fccbcbcc24e8ea327e5276241be4a8c451 /mail | |
parent | 4728c6f6c0d0a9b35457af020c2301f26f2f8efb (diff) | |
download | gsoc2013-evolution-352108b2ef5a7da0d1a30e99b039b87d05731b5e.tar gsoc2013-evolution-352108b2ef5a7da0d1a30e99b039b87d05731b5e.tar.gz gsoc2013-evolution-352108b2ef5a7da0d1a30e99b039b87d05731b5e.tar.bz2 gsoc2013-evolution-352108b2ef5a7da0d1a30e99b039b87d05731b5e.tar.lz gsoc2013-evolution-352108b2ef5a7da0d1a30e99b039b87d05731b5e.tar.xz gsoc2013-evolution-352108b2ef5a7da0d1a30e99b039b87d05731b5e.tar.zst gsoc2013-evolution-352108b2ef5a7da0d1a30e99b039b87d05731b5e.zip |
Bug #655942 - Shows 'Storing folder...' when deleting a local folder
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-folder-utils.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mail/e-mail-folder-utils.c b/mail/e-mail-folder-utils.c index 64bdbdb821..d7d4808058 100644 --- a/mail/e-mail-folder-utils.c +++ b/mail/e-mail-folder-utils.c @@ -765,6 +765,12 @@ mail_folder_remove_recursive (CamelStore *store, return success; } +static void +follow_cancel_cb (GCancellable *cancellable, GCancellable *transparent_cancellable) +{ + g_cancellable_cancel (transparent_cancellable); +} + gboolean e_mail_folder_remove_sync (CamelFolder *folder, GCancellable *cancellable, @@ -776,6 +782,8 @@ e_mail_folder_remove_sync (CamelFolder *folder, CamelStore *parent_store; const gchar *full_name; gboolean success = TRUE; + GCancellable *transparent_cancellable = NULL; + gulong cbid = 0; g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE); @@ -824,8 +832,18 @@ e_mail_folder_remove_sync (CamelFolder *folder, cancellable, _("Removing folder '%s'"), camel_folder_get_full_name (folder)); + if (cancellable) { + transparent_cancellable = g_cancellable_new (); + cbid = g_cancellable_connect (cancellable, G_CALLBACK (follow_cancel_cb), transparent_cancellable, NULL); + } + success = mail_folder_remove_recursive ( - parent_store, to_remove, cancellable, error); + parent_store, to_remove, transparent_cancellable, error); + + if (transparent_cancellable) { + g_cancellable_disconnect (cancellable, cbid); + g_object_unref (transparent_cancellable); + } camel_operation_pop_message (cancellable); |