diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-04 02:42:29 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-04 02:42:29 +0800 |
commit | a9c9f0be5fd5aa5667412a7f1fb516d9133874df (patch) | |
tree | 4bbad728c879104495663703512688f423d04b57 /mail/e-mail-paned-view.c | |
parent | 76280e456d8d9789e9a9d2186926fc5607bd8967 (diff) | |
download | gsoc2013-evolution-a9c9f0be5fd5aa5667412a7f1fb516d9133874df.tar.gz gsoc2013-evolution-a9c9f0be5fd5aa5667412a7f1fb516d9133874df.tar.zst gsoc2013-evolution-a9c9f0be5fd5aa5667412a7f1fb516d9133874df.zip |
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().
Diffstat (limited to 'mail/e-mail-paned-view.c')
-rw-r--r-- | mail/e-mail-paned-view.c | 17 |
1 files changed, 8 insertions, 9 deletions
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 = |