diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-24 05:09:24 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:19 +0800 |
commit | 7050475f84247fb15e24aa1bb31502106c18815d (patch) | |
tree | 60e500f221d5f97b241045b10806c5c4ddbcc7c1 /modules/mail/e-mail-shell-backend.c | |
parent | a98cb0a9820d2119bf10c317e5f6a9d56dd9073c (diff) | |
download | gsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.tar gsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.tar.gz gsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.tar.bz2 gsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.tar.lz gsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.tar.xz gsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.tar.zst gsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.zip |
EMFolderTree: Store an EMailBackend instead of an EMailSession.
All this so EMFolderTree can submit EActivity instances for async ops.
You can obtain an EMailSession from an EMailBackend, but not vice versa.
Creates lots of pretty ripples in the mail code, but ultimately reduces
complexity. So it's a code cleanup of sorts.
Diffstat (limited to 'modules/mail/e-mail-shell-backend.c')
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 0c02a48a05..f7e9b81ae1 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -106,7 +106,7 @@ action_mail_folder_new_cb (GtkAction *action, { EMFolderTree *folder_tree = NULL; EMailShellSidebar *mail_shell_sidebar; - EMailSession *mail_session; + EMailBackend *backend; EShellSidebar *shell_sidebar; EShellView *shell_view; const gchar *view_name; @@ -114,19 +114,16 @@ action_mail_folder_new_cb (GtkAction *action, /* Take care not to unnecessarily load the mail shell view. */ view_name = e_shell_window_get_active_view (shell_window); if (g_strcmp0 (view_name, BACKEND_NAME) != 0) { - EShellBackend *mail_backend; + EShellBackend *shell_backend; EShell *shell; shell = e_shell_window_get_shell (shell_window); - mail_backend = + shell_backend = e_shell_get_backend_by_name (shell, BACKEND_NAME); - g_return_if_fail (mail_backend != NULL); + g_return_if_fail (E_IS_MAIL_BACKEND (shell_backend)); - mail_session = - e_mail_backend_get_session ( - E_MAIL_BACKEND (mail_backend)); - g_return_if_fail (mail_session != NULL); + backend = E_MAIL_BACKEND (shell_backend); goto exit; } @@ -136,11 +133,11 @@ action_mail_folder_new_cb (GtkAction *action, mail_shell_sidebar = E_MAIL_SHELL_SIDEBAR (shell_sidebar); folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar); - mail_session = em_folder_tree_get_session (folder_tree); + backend = em_folder_tree_get_backend (folder_tree); exit: em_folder_utils_create_folder ( - GTK_WINDOW (shell_window), folder_tree, mail_session, NULL); + GTK_WINDOW (shell_window), backend, folder_tree, NULL); } static void |