diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-12 20:48:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-12 20:51:55 +0800 |
commit | dbb4c2472f54845f131f4df91aa11ec1d852b80a (patch) | |
tree | 6858970f1fa33c78fa23b7879e3af5868f28be75 /mail/e-mail-reader.c | |
parent | 2f326f6ca43816ff3bab4f377ae1eaaa4e6bb47d (diff) | |
download | gsoc2013-evolution-dbb4c2472f54845f131f4df91aa11ec1d852b80a.tar.gz gsoc2013-evolution-dbb4c2472f54845f131f4df91aa11ec1d852b80a.tar.zst gsoc2013-evolution-dbb4c2472f54845f131f4df91aa11ec1d852b80a.zip |
Bug 626724 - Folder tree mistakes "mark as unread" as new mail
Diffstat (limited to 'mail/e-mail-reader.c')
-rw-r--r-- | mail/e-mail-reader.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 0cb67ce3b1..5a0ef4628d 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -575,17 +575,26 @@ action_mail_mark_unread_cb (GtkAction *action, EMailReader *reader) { GtkWidget *message_list; + EMFolderTreeModel *model; + const gchar *folder_uri; guint32 mask = CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED; guint32 set = 0; + guint n_marked; message_list = e_mail_reader_get_message_list (reader); - e_mail_reader_mark_selected (reader, mask, set); + n_marked = e_mail_reader_mark_selected (reader, mask, set); if (MESSAGE_LIST (message_list)->seen_id != 0) { g_source_remove (MESSAGE_LIST (message_list)->seen_id); MESSAGE_LIST (message_list)->seen_id = 0; } + + /* Notify the tree model that the user has marked messages as + * unread so it doesn't mistake the event as new mail arriving. */ + model = em_folder_tree_model_get_default (); + folder_uri = e_mail_reader_get_folder_uri (reader); + em_folder_tree_model_user_marked_unread (model, folder_uri, n_marked); } static void |