diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-04-13 22:30:40 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-06-03 11:00:40 +0800 |
commit | 3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81 (patch) | |
tree | ff59febf4ac0c6316ef344ea25cee002088bd314 /mail/e-mail-folder-pane.c | |
parent | f78795f4dff8b225d78385c5e23e1cd44ee946ad (diff) | |
download | gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar.gz gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.tar.zst gsoc2013-evolution-3449e5fcc7f9c797fcde7f2a444b1eb7a934cd81.zip |
Adapt mail to the new ESource API.
Diffstat (limited to 'mail/e-mail-folder-pane.c')
-rw-r--r-- | mail/e-mail-folder-pane.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mail/e-mail-folder-pane.c b/mail/e-mail-folder-pane.c index 7e0457e3bd..03168cec18 100644 --- a/mail/e-mail-folder-pane.c +++ b/mail/e-mail-folder-pane.c @@ -74,7 +74,10 @@ folder_pane_set_preview_visible (EMailView *view, static guint mail_paned_view_open_selected_mail (EMailPanedView *view) { + EShell *shell; EMailReader *reader; + EMailBackend *backend; + ESourceRegistry *registry; GPtrArray *uids; gint i; GtkWindow *window; @@ -88,6 +91,10 @@ mail_paned_view_open_selected_mail (EMailPanedView *view) uids = e_mail_reader_get_selected_uids (reader); g_return_val_if_fail (uids != NULL, 0); + backend = e_mail_reader_get_backend (reader); + shell = e_shell_backend_get_shell (E_SHELL_BACKEND (backend)); + registry = e_shell_get_registry (shell); + /* XXX Either e_mail_reader_get_selected_uids() * or MessageList should do this itself. */ g_ptr_array_set_free_func (uids, (GDestroyNotify) g_free); @@ -97,9 +104,9 @@ mail_paned_view_open_selected_mail (EMailPanedView *view) return 0; } - if (em_utils_folder_is_drafts (folder) || - em_utils_folder_is_outbox (folder) || - em_utils_folder_is_templates (folder)) { + if (em_utils_folder_is_drafts (registry, folder) || + em_utils_folder_is_outbox (registry, folder) || + em_utils_folder_is_templates (registry, folder)) { em_utils_edit_messages (reader, folder, uids, TRUE); g_ptr_array_unref (uids); return 0; @@ -127,8 +134,8 @@ mail_paned_view_open_selected_mail (EMailPanedView *view) CAMEL_VEE_FOLDER (folder), (CamelVeeMessageInfo *) info, &real_uid); - if (em_utils_folder_is_drafts (real_folder) || - em_utils_folder_is_outbox (real_folder)) { + if (em_utils_folder_is_drafts (registry, real_folder) || + em_utils_folder_is_outbox (registry, real_folder)) { GPtrArray *edits; edits = g_ptr_array_new_with_free_func ( |