diff options
-rw-r--r-- | mail/e-mail-reader.c | 6 | ||||
-rw-r--r-- | mail/em-folder-tree-model.c | 8 | ||||
-rw-r--r-- | mail/em-folder-tree-model.h | 2 | ||||
-rw-r--r-- | mail/message-list.c | 2 |
4 files changed, 11 insertions, 7 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 631fe5789a..9d3ca5c228 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -883,7 +883,7 @@ action_mail_mark_unread_cb (GtkAction *action, { GtkWidget *message_list; EMFolderTreeModel *model; - const gchar *folder_uri; + CamelFolder *folder; guint32 mask = CAMEL_MESSAGE_SEEN | CAMEL_MESSAGE_DELETED; guint32 set = 0; guint n_marked; @@ -900,8 +900,8 @@ action_mail_mark_unread_cb (GtkAction *action, /* 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); + folder = e_mail_reader_get_folder (reader); + em_folder_tree_model_user_marked_unread (model, folder, n_marked); } static void diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index c989d4e205..de9dfe6db1 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -1290,12 +1290,13 @@ em_folder_tree_model_lookup_uri (EMFolderTreeModel *model, void em_folder_tree_model_user_marked_unread (EMFolderTreeModel *model, - const gchar *folder_uri, + CamelFolder *folder, guint n_marked) { GtkTreeRowReference *reference; GtkTreePath *path; GtkTreeIter iter; + gchar *folder_uri; guint unread; /* The user marked messages in the given folder as unread. @@ -1303,9 +1304,12 @@ em_folder_tree_model_user_marked_unread (EMFolderTreeModel *model, * event as new mail arriving. */ g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model)); - g_return_if_fail (folder_uri != NULL); + g_return_if_fail (CAMEL_IS_FOLDER (folder)); + folder_uri = e_mail_folder_uri_from_folder (folder); reference = em_folder_tree_model_lookup_uri (model, folder_uri); + g_free (folder_uri); + g_return_if_fail (gtk_tree_row_reference_valid (reference)); path = gtk_tree_row_reference_get_path (reference); diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h index ac13c3d3f2..144c5bfcb2 100644 --- a/mail/em-folder-tree-model.h +++ b/mail/em-folder-tree-model.h @@ -166,7 +166,7 @@ GtkTreeRowReference * const gchar *folder_uri); void em_folder_tree_model_user_marked_unread (EMFolderTreeModel *model, - const gchar *folder_uri, + CamelFolder *folder, guint n_marked); G_END_DECLS diff --git a/mail/message-list.c b/mail/message-list.c index ba1808838b..6c0b532286 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -4042,7 +4042,7 @@ on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, Mess model = em_folder_tree_model_get_default (); em_folder_tree_model_user_marked_unread ( - model, list->folder_uri, 1); + model, list->folder, 1); } if (flag == CAMEL_MESSAGE_SEEN && list->seen_id) { |