aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c16
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 <NotZed@Ximian.com>
+
+ * 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 <fejj@ximian.com>
* 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;i<uids->len;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