aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author2 <NotZed@Ximian.com>2001-10-22 09:39:32 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-22 09:39:32 +0800
commit4b2464746f984012a57baeb9439215d159c63ece (patch)
tree6a1e36bc747e48fda4e468f749780cadaf24d77e
parent2eb6b07427b769ccc10034b9c5c32c226b3a8681 (diff)
downloadgsoc2013-evolution-4b2464746f984012a57baeb9439215d159c63ece.tar.gz
gsoc2013-evolution-4b2464746f984012a57baeb9439215d159c63ece.tar.zst
gsoc2013-evolution-4b2464746f984012a57baeb9439215d159c63ece.zip
Instead of select_all() then using the tree's selected nodes to iterate,
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. svn path=/trunk/; revision=13860
-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