diff options
author | Not Zed <NotZed@Ximian.com> | 2001-08-01 12:57:01 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-08-01 12:57:01 +0800 |
commit | 6f22eb642b794def699ce9341219f56d793a50fb (patch) | |
tree | 13397d532bcc83b891e7d4dfc8e46b72d37d819c /camel/providers | |
parent | 96d24f1297eaa5a6333b9fcfdf35420d273703af (diff) | |
download | gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.gz gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.bz2 gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.lz gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.xz gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.tar.zst gsoc2013-evolution-6f22eb642b794def699ce9341219f56d793a50fb.zip |
Slightly re-arranged filter/change notification logic. If we;re filtering,
2001-08-01 Not Zed <NotZed@Ximian.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Slightly re-arranged filter/change notification logic. If we;re
filtering, freeze the folder till we're finished to smooth the ui
for new mail.
2001-07-31 Not Zed <NotZed@Ximian.com>
* camel-folder.c (camel_folder_init): Chagned mutexes to
e_mutexes, folder lock recursive. This fixes the imap filtering
bug, or at least some cases of it.
(camel_folder_finalize): Free mutexes.
* camel-private.h (CamelFolderPrivate): Changed mutexes to
e_mutexes.
2001-07-25 Not Zed <NotZed@Ximian.com>
* camel-folder.c (camel_folder_change_info_*): Change the
return if fail's into asserts.
(camel_folder_change_info_free): Don't let it accept a NULL
argument. This isn't g_lib so we dont have to.
svn path=/trunk/; revision=11537
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 3984db4bd9..ba30ac7cc1 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1846,27 +1846,35 @@ camel_imap_folder_changed (CamelFolder *folder, int exists, imap_update_summary (folder, exists, changes, recents, ex); } - if (camel_folder_change_info_changed (changes)) { - camel_object_trigger_event (CAMEL_OBJECT (folder), - "folder_changed", changes); + /* if we have updates to make for filtering (probably), then we freeze the + folder so we dont show them till they're complete, this may cause unacceptable + delays for users, but the alternative isn't very nice either (show them and let + them change as processed) */ + if (recents && !camel_exception_is_set(ex) && recents->len) { + CamelFilterDriver *driver; + + camel_folder_freeze(folder); + + if (camel_folder_change_info_changed(changes)) + camel_object_trigger_event(CAMEL_OBJECT(folder), "folder_changed", changes); + + driver = camel_session_get_filter_driver(CAMEL_SERVICE(folder->parent_store)->session, "incoming", ex); + if (driver) { + camel_filter_driver_filter_folder(driver, folder, NULL, recents, FALSE, ex); + camel_object_unref(CAMEL_OBJECT(driver)); + } + + camel_folder_thaw(folder); + } else { + if (camel_folder_change_info_changed(changes)) + camel_object_trigger_event(CAMEL_OBJECT(folder), "folder_changed", changes); } + camel_folder_change_info_free (changes); - if (recents) { - if (!camel_exception_is_set (ex) && recents->len) { - CamelFilterDriver *driver; - - driver = camel_session_get_filter_driver ( - CAMEL_SERVICE (folder->parent_store)->session, - "incoming", ex); - if (driver) { - camel_filter_driver_filter_folder ( - driver, folder, NULL, recents, FALSE, ex); - camel_object_unref (CAMEL_OBJECT (driver)); - } - } + if (recents) g_ptr_array_free (recents, TRUE); - } + camel_folder_summary_save (folder->summary); } |