aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox/camel-mbox-summary.c
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2000-05-12 04:46:13 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-12 04:46:13 +0800
commitcb13084bc24c04b16af88744f6eb67ae7f779018 (patch)
treecaf9b9f3349d79de9adb45f0d54aadabae298ad0 /camel/providers/mbox/camel-mbox-summary.c
parentd41602b8ecf24d2c99ce52a4f3fd1ed6a6300d34 (diff)
downloadgsoc2013-evolution-cb13084bc24c04b16af88744f6eb67ae7f779018.tar
gsoc2013-evolution-cb13084bc24c04b16af88744f6eb67ae7f779018.tar.gz
gsoc2013-evolution-cb13084bc24c04b16af88744f6eb67ae7f779018.tar.bz2
gsoc2013-evolution-cb13084bc24c04b16af88744f6eb67ae7f779018.tar.lz
gsoc2013-evolution-cb13084bc24c04b16af88744f6eb67ae7f779018.tar.xz
gsoc2013-evolution-cb13084bc24c04b16af88744f6eb67ae7f779018.tar.zst
gsoc2013-evolution-cb13084bc24c04b16af88744f6eb67ae7f779018.zip
> * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
> the summary changed also. > > (camel_mbox_summary_update): Also save summary when done. > (camel_mbox_summary_expunge): Unindex items when deleting them. > (camel_mbox_summary_expunge): Save the index as well as the > summary. > (camel_folder_summary_touch): New function, indicate the summary > info changed. > (camel_folder_summary_remove): Dirty here. svn path=/trunk/; revision=2994
Diffstat (limited to 'camel/providers/mbox/camel-mbox-summary.c')
-rw-r--r--camel/providers/mbox/camel-mbox-summary.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c
index ead844ee66..56ff1cb198 100644
--- a/camel/providers/mbox/camel-mbox-summary.c
+++ b/camel/providers/mbox/camel-mbox-summary.c
@@ -323,8 +323,23 @@ summary_rebuild(CamelMboxSummary *mbs, off_t offset)
int
camel_mbox_summary_update(CamelMboxSummary *mbs, off_t offset)
{
+ int ret;
+
mbs->index_force = FALSE;
- return summary_rebuild(mbs, offset);
+ ret = summary_rebuild(mbs, offset);
+
+#if 0
+#warning "Saving full summary and index after every summarisation is slow ..."
+ if (ret != -1) {
+ if (camel_folder_summary_save((CamelFolderSummary *)mbs) == -1)
+ g_warning("Could not save summary: %s", strerror(errno));
+ printf("summary saved\n");
+ if (mbs->index)
+ ibex_save(mbs->index);
+ printf("ibex saved\n");
+ }
+#endif
+ return ret;
}
int
@@ -581,6 +596,8 @@ camel_mbox_summary_expunge(CamelMboxSummary *mbs)
g_assert(!quick);
offset -= (info->info.content->endpos - info->frompos);
+ if (mbs->index)
+ ibex_unindex(mbs->index, info->info.uid);
camel_folder_summary_remove(s, (CamelMessageInfo *)info);
count--;
i--;
@@ -690,6 +707,8 @@ camel_mbox_summary_expunge(CamelMboxSummary *mbs)
s->time = st.st_mtime;
mbs->folder_size = st.st_size;
camel_folder_summary_save(s);
+ if (mbs->index)
+ ibex_save(mbs->index);
}
gtk_object_unref((GtkObject *)mp);