From 4b2464746f984012a57baeb9439215d159c63ece Mon Sep 17 00:00:00 2001 From: 2 Date: Mon, 22 Oct 2001 01:39:32 +0000 Subject: Instead of select_all() then using the tree's selected nodes to iterate, 2001-10-22 * mail-callbacks.c (mark_all_as_seen): Instead of select_all() then using the tree's selected nodes to iterate, just do it on the folder which keeps the current selection. Fixes #3658. svn path=/trunk/; revision=13860 --- mail/ChangeLog | 6 ++++++ mail/mail-callbacks.c | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 34736defd1..1e2995fd7e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-10-22 + + * mail-callbacks.c (mark_all_as_seen): Instead of select_all() + then using the tree's selected nodes to iterate, just do it on the + folder which keeps the current selection. Fixes #3658. + 2001-10-21 Jeffrey Stedfast * folder-browser.c: Call the new move/copy_msg_cb's diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 9fccdd051d..2be46015a4 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1567,8 +1567,20 @@ mark_as_unseen (BonoboUIComponent *uih, void *user_data, const char *path) void mark_all_as_seen (BonoboUIComponent *uih, void *user_data, const char *path) { - select_all (uih, user_data, path); - flag_messages (FOLDER_BROWSER (user_data), CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN); + FolderBrowser *fb = user_data; + MessageList *ml = fb->message_list; + GPtrArray *uids; + int i; + + if (ml == NULL) + return; + + uids = camel_folder_get_uids(ml->folder); + camel_folder_freeze(ml->folder); + for (i=0;ilen;i++) + camel_folder_set_message_flags(ml->folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, ~0); + camel_folder_thaw(ml->folder); + g_ptr_array_free(uids, TRUE); } void -- cgit v1.2.3