aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 23:30:11 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:06 +0800
commit5d1d6f4969e37f67e0900aa51ba6a51a3222ed1d (patch)
treeebaae5530392b980494090e7e6dfa0950e851537 /mail
parent9beae6f09e3306e471daf50d1bccc33fd15b3847 (diff)
downloadgsoc2013-evolution-5d1d6f4969e37f67e0900aa51ba6a51a3222ed1d.tar.gz
gsoc2013-evolution-5d1d6f4969e37f67e0900aa51ba6a51a3222ed1d.tar.zst
gsoc2013-evolution-5d1d6f4969e37f67e0900aa51ba6a51a3222ed1d.zip
Change em_folder_tree_model_user_marked_unread() params.
Take a CamelFolder instead of a folder URI string.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-reader.c6
-rw-r--r--mail/em-folder-tree-model.c8
-rw-r--r--mail/em-folder-tree-model.h2
-rw-r--r--mail/message-list.c2
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) {