[evolution] Drop 'folder_uri' param from message_list_set_folder().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Drop 'folder_uri' param from message_list_set_folder().
- Date: Tue, 3 May 2011 02:03:46 +0000 (UTC)
commit 0434afb9a5831d93a5c0dd7c842aa3f92efa3dae
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon May 2 21:54:12 2011 -0400
Drop 'folder_uri' param from message_list_set_folder().
mail/e-mail-reader.c | 2 +-
mail/message-list.c | 17 ++++++++++++-----
mail/message-list.h | 3 +--
3 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 094facd..b9e77b8 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 214740b..ba18088 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 4ca9015..699c4ce 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]