From fdf48a9b1426c2200ad9a628f78226b55fe63ec9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 3 May 2011 14:42:29 -0400 Subject: Remove e_mail_reader_get_folder_uri(). Instead call e_mail_reader_get_folder() and, if you really need to, generate the folder URI with e_mail_folder_uri_from_folder(). --- mail/e-mail-paned-view.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'mail/e-mail-paned-view.c') diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c index e91050b499..33c8a6e98a 100644 --- a/mail/e-mail-paned-view.c +++ b/mail/e-mail-paned-view.c @@ -44,6 +44,7 @@ #include "mail-config.h" #include "mail-ops.h" #include "message-list.h" +#include "e-mail-folder-utils.h" #include "e-mail-reader-utils.h" #define E_SHELL_WINDOW_ACTION_GROUP_MAIL(window) \ @@ -95,22 +96,25 @@ mail_paned_view_save_boolean (EMailView *view, { EShellView *shell_view; EMailReader *reader; + CamelFolder *folder; GKeyFile *key_file; - const gchar *folder_uri; + gchar *folder_uri; gchar *group_name; shell_view = e_mail_view_get_shell_view (view); key_file = e_shell_view_get_state_key_file (shell_view); reader = E_MAIL_READER (view); - folder_uri = e_mail_reader_get_folder_uri (reader); + folder = e_mail_reader_get_folder (reader); - if (folder_uri == NULL) + if (folder == NULL) return; + folder_uri = e_mail_folder_uri_from_folder (folder); group_name = g_strdup_printf ("Folder %s", folder_uri); g_key_file_set_boolean (key_file, group_name, key, value); g_free (group_name); + g_free (folder_uri); e_shell_view_set_state_dirty (shell_view); } @@ -749,7 +753,6 @@ mail_paned_view_update_view_instance (EMailView *view) GtkOrientation orientation; gboolean outgoing_folder; gboolean show_vertical_view; - const gchar *folder_uri; gchar *view_id; priv = E_MAIL_PANED_VIEW (view)->priv; @@ -764,21 +767,17 @@ mail_paned_view_update_view_instance (EMailView *view) reader = E_MAIL_READER (view); folder = e_mail_reader_get_folder (reader); - folder_uri = e_mail_reader_get_folder_uri (reader); /* If no folder is selected, return silently. */ if (folder == NULL) return; - /* If we have a folder, we should also have a URI. */ - g_return_if_fail (folder_uri != NULL); - if (priv->view_instance != NULL) { g_object_unref (priv->view_instance); priv->view_instance = NULL; } - view_id = g_strdup (folder_uri); + view_id = e_mail_folder_uri_from_folder (folder); e_filename_make_safe (view_id); outgoing_folder = -- cgit