aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-03 09:17:49 +0800
committerDan Winship <danw@src.gnome.org>2000-07-03 09:17:49 +0800
commit03b3618408f037589882655e4b97e7b75787b756 (patch)
treec071735ef43e517e3b3bceb4f08c9543180470b5 /camel/providers
parent033a1cd5a7336659319b697d319b8c912bf3771a (diff)
downloadgsoc2013-evolution-03b3618408f037589882655e4b97e7b75787b756.tar.gz
gsoc2013-evolution-03b3618408f037589882655e4b97e7b75787b756.tar.zst
gsoc2013-evolution-03b3618408f037589882655e4b97e7b75787b756.zip
New functions to freeze and thaw a folder (to prevent message/folder
* camel-folder.c (camel_folder_freeze, camel_folder_thaw): New functions to freeze and thaw a folder (to prevent message/folder changed signals in the middle of a long series of operations). (camel_folder_class_init): Change signals to GTK_RUN_FIRST. (message_changed, folder_changed): Add default implementations that stop the emission and record info for later if the folder is frozen. * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes from the close->sync change: don't destroy the ibex, summary, and search when syncing. svn path=/trunk/; revision=3863
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 09b718a1de..6efa93a42c 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -245,19 +245,10 @@ mbox_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
camel_mbox_summary_sync (mbox_folder->summary, FALSE, ex);
/* save index */
- if (mbox_folder->index) {
- ibex_close(mbox_folder->index);
- mbox_folder->index = NULL;
- }
- if (mbox_folder->summary) {
+ if (mbox_folder->index)
+ ibex_save(mbox_folder->index);
+ if (mbox_folder->summary)
camel_folder_summary_save (CAMEL_FOLDER_SUMMARY (mbox_folder->summary));
- gtk_object_unref (GTK_OBJECT (mbox_folder->summary));
- mbox_folder->summary = NULL;
- }
- if (mbox_folder->search) {
- gtk_object_unref (GTK_OBJECT (mbox_folder->search));
- mbox_folder->search = NULL;
- }
}
static void
@@ -341,7 +332,8 @@ mbox_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
gtk_object_unref (GTK_OBJECT (output_stream));
/* force a summary update - will only update from the new position, if it can */
- camel_mbox_summary_update (mbox_folder->summary, seek);
+ if (camel_mbox_summary_update (mbox_folder->summary, seek) == 0)
+ gtk_signal_emit_by_name (GTK_OBJECT (folder), "folder_changed", 0);
return;
fail: