aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 09:54:12 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:05 +0800
commit4139e132c1d11b75d7741b0750d9d7535834327f (patch)
tree1a07c6b42cdb960d4a01ff581d61912f371a33bc /mail
parentd6ef84d4112306810fe1d6873605ffb723a9e853 (diff)
downloadgsoc2013-evolution-4139e132c1d11b75d7741b0750d9d7535834327f.tar
gsoc2013-evolution-4139e132c1d11b75d7741b0750d9d7535834327f.tar.gz
gsoc2013-evolution-4139e132c1d11b75d7741b0750d9d7535834327f.tar.bz2
gsoc2013-evolution-4139e132c1d11b75d7741b0750d9d7535834327f.tar.lz
gsoc2013-evolution-4139e132c1d11b75d7741b0750d9d7535834327f.tar.xz
gsoc2013-evolution-4139e132c1d11b75d7741b0750d9d7535834327f.tar.zst
gsoc2013-evolution-4139e132c1d11b75d7741b0750d9d7535834327f.zip
Drop 'folder_uri' param from message_list_set_folder().
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-reader.c2
-rw-r--r--mail/message-list.c17
-rw-r--r--mail/message-list.h3
3 files changed, 14 insertions, 8 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 094facd7e5..b9e77b825c 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -2940,7 +2940,7 @@ mail_reader_set_folder (EMailReader *reader,
priv->folder_was_just_selected = (folder != NULL);
message_list_set_folder (
- MESSAGE_LIST (message_list), folder, folder_uri, outgoing);
+ MESSAGE_LIST (message_list), folder, outgoing);
mail_reader_emit_folder_loaded (reader);
}
diff --git a/mail/message-list.c b/mail/message-list.c
index 214740b99c..ba1808838b 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3763,7 +3763,6 @@ folder_changed (CamelFolder *folder,
* message_list_set_folder:
* @message_list: Message List widget
* @folder: folder backend to be set
- * @uri: uri of @folder.
* @outgoing: whether this is an outgoing folder
*
* Sets @folder to be the backend folder for @message_list. If
@@ -3771,7 +3770,9 @@ folder_changed (CamelFolder *folder,
* the "Outgoing folder" column view.
**/
void
-message_list_set_folder (MessageList *message_list, CamelFolder *folder, const gchar *uri, gboolean outgoing)
+message_list_set_folder (MessageList *message_list,
+ CamelFolder *folder,
+ gboolean outgoing)
{
ETreeModel *etm = message_list->model;
gboolean hide_deleted;
@@ -3818,9 +3819,15 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const g
message_list->thread_tree = NULL;
}
- if (message_list->folder_uri != uri) {
- g_free (message_list->folder_uri);
- message_list->folder_uri = uri ? g_strdup (uri):NULL;
+ g_free (message_list->folder_uri);
+ message_list->folder_uri = NULL;
+
+ /* XXX Not sure if MESSAGE_SELECTED signal handlers rely on
+ * folder_uri being set, so avoid temptation to move this
+ * logic down until verifying it's safe. */
+ if (CAMEL_IS_FOLDER (folder)) {
+ const gchar *uri = camel_folder_get_uri (folder);
+ message_list->folder_uri = g_strdup (uri);
}
if (message_list->cursor_uid) {
diff --git a/mail/message-list.h b/mail/message-list.h
index 4ca9015490..699c4ce47f 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -181,8 +181,7 @@ GType message_list_get_type (void);
GtkWidget * message_list_new (EMailBackend *backend);
EMailBackend * message_list_get_backend (MessageList *message_list);
void message_list_set_folder (MessageList *message_list,
- CamelFolder *camel_folder,
- const gchar *uri,
+ CamelFolder *folder,
gboolean outgoing);
GtkTargetList * message_list_get_copy_target_list
(MessageList *message_list);