diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-03 09:54:12 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-03 09:54:12 +0800 |
commit | 0434afb9a5831d93a5c0dd7c842aa3f92efa3dae (patch) | |
tree | 3956a87fa4392f6a4a0d5ece795ede825af6d0d2 /mail | |
parent | 1e95563462edb8e4db64889811cfa2abb7107c58 (diff) | |
download | gsoc2013-evolution-0434afb9a5831d93a5c0dd7c842aa3f92efa3dae.tar gsoc2013-evolution-0434afb9a5831d93a5c0dd7c842aa3f92efa3dae.tar.gz gsoc2013-evolution-0434afb9a5831d93a5c0dd7c842aa3f92efa3dae.tar.bz2 gsoc2013-evolution-0434afb9a5831d93a5c0dd7c842aa3f92efa3dae.tar.lz gsoc2013-evolution-0434afb9a5831d93a5c0dd7c842aa3f92efa3dae.tar.xz gsoc2013-evolution-0434afb9a5831d93a5c0dd7c842aa3f92efa3dae.tar.zst gsoc2013-evolution-0434afb9a5831d93a5c0dd7c842aa3f92efa3dae.zip |
Drop 'folder_uri' param from message_list_set_folder().
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-reader.c | 2 | ||||
-rw-r--r-- | mail/message-list.c | 17 | ||||
-rw-r--r-- | 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 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); |