aboutsummaryrefslogtreecommitdiff
path: root/src/procmsg.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-05-27 10:57:37 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-05-27 10:57:37 +0000
commit0c58540309726e0e476d90ca9d488142a58b4fcd (patch)
treee66d05f06fe02ba193f1a63a69bcaee8dc8c6596 /src/procmsg.c
parent2ddb31bb4cf51711d786e1a994f2a91ed80e7cee (diff)
optimized the writing of mark file.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@293 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/procmsg.c')
-rw-r--r--src/procmsg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/procmsg.c b/src/procmsg.c
index 0dc17a16..c97d7b02 100644
--- a/src/procmsg.c
+++ b/src/procmsg.c
@@ -328,6 +328,7 @@ void procmsg_set_flags(GSList *mlist, FolderItem *item)
if (!mark_table) {
item->new = item->unread = item->total = g_slist_length(mlist);
item->updated = TRUE;
+ item->mark_dirty = TRUE;
return;
}
@@ -340,6 +341,7 @@ void procmsg_set_flags(GSList *mlist, FolderItem *item)
if (!flags) {
g_hash_table_foreach(mark_table,
mark_unset_new_func, NULL);
+ item->mark_dirty = TRUE;
break;
}
}
@@ -382,6 +384,9 @@ void procmsg_set_flags(GSList *mlist, FolderItem *item)
item->last_num = lastnum;
item->updated = TRUE;
+ if (unflagged > 0)
+ item->mark_dirty = TRUE;
+
debug_print("new: %d unread: %d unflagged: %d total: %d\n",
new, unread, unflagged, total);
@@ -628,6 +633,7 @@ static GHashTable *procmsg_read_mark_file(FolderItem *item)
if (item->mark_queue) {
g_hash_table_foreach(mark_table, mark_unset_new_func, NULL);
+ item->mark_dirty = TRUE;
}
for (cur = item->mark_queue; cur != NULL; cur = cur->next) {
@@ -650,6 +656,7 @@ static GHashTable *procmsg_read_mark_file(FolderItem *item)
procmsg_write_mark_file(item, mark_table);
procmsg_msg_list_free(item->mark_queue);
item->mark_queue = NULL;
+ item->mark_dirty = FALSE;
}
return mark_table;