diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-09-10 01:30:52 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-09-10 01:30:52 +0800 |
commit | 6c42500a9e9827d875d9934d97adfe709844f80e (patch) | |
tree | 076718cd56eed387cc711226dcfea947066d4e0c /mail | |
parent | a528ec34eff01a96915a4efc60f951aea7c8e1e2 (diff) | |
download | gsoc2013-evolution-6c42500a9e9827d875d9934d97adfe709844f80e.tar gsoc2013-evolution-6c42500a9e9827d875d9934d97adfe709844f80e.tar.gz gsoc2013-evolution-6c42500a9e9827d875d9934d97adfe709844f80e.tar.bz2 gsoc2013-evolution-6c42500a9e9827d875d9934d97adfe709844f80e.tar.lz gsoc2013-evolution-6c42500a9e9827d875d9934d97adfe709844f80e.tar.xz gsoc2013-evolution-6c42500a9e9827d875d9934d97adfe709844f80e.tar.zst gsoc2013-evolution-6c42500a9e9827d875d9934d97adfe709844f80e.zip |
Freeze the default folder before filtering and thaw it afterward to
2000-09-09 Jeffrey Stedfast <fejj@helixcode.com>
* mail-ops.c (do_fetch_mail): Freeze the default folder before
filtering and thaw it afterward to prevent a ton of
"folder_changed" signals from being queued.
svn path=/trunk/; revision=5286
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/mail-ops.c | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 78a1665e17..10d300ff27 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2000-09-09 Jeffrey Stedfast <fejj@helixcode.com> + + * mail-ops.c (do_fetch_mail): Freeze the default folder before + filtering and thaw it afterward to prevent a ton of + "folder_changed" signals from being queued. + 2000-09-08 Christopher James Lahey <clahey@helixcode.com> * folder-browser.c, mail-config-gui.c, mail-ops.c: Fixed some diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 8a507e01fc..0335910259 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -158,6 +158,8 @@ do_fetch_mail (gpointer in_data, gpointer op_data, CamelException *ex) camel_object_hook_event (CAMEL_OBJECT (input->destination), "folder_changed", input->hook_func, input->hook_data); + camel_folder_freeze (input->destination); + uids = camel_folder_get_uids (folder); for (i = 0; i < uids->len; i++) { CamelMimeMessage *message; @@ -197,7 +199,15 @@ do_fetch_mail (gpointer in_data, gpointer op_data, CamelException *ex) } camel_object_unref (CAMEL_OBJECT (message)); } - camel_folder_sync (folder, TRUE, ex); + + camel_folder_sync (folder, FALSE, ex); + + camel_folder_thaw (input->destination); + + if (input->hook_func) + camel_object_unhook_event (CAMEL_OBJECT (folder), "folder_changed", + input->hook_func, input->hook_data); + camel_folder_free_uids (folder, uids); data->empty = FALSE; |