aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-24 05:09:24 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:19 +0800
commit7050475f84247fb15e24aa1bb31502106c18815d (patch)
tree60e500f221d5f97b241045b10806c5c4ddbcc7c1 /plugins
parenta98cb0a9820d2119bf10c317e5f6a9d56dd9073c (diff)
downloadgsoc2013-evolution-7050475f84247fb15e24aa1bb31502106c18815d.tar.gz
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 'plugins')
-rw-r--r--plugins/dbx-import/dbx-importer.c5
-rw-r--r--plugins/mark-all-read/mark-all-read.c5
-rw-r--r--plugins/pst-import/pst-importer.c7
3 files changed, 10 insertions, 7 deletions
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index c9ecca9127..9b6f44c171 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -203,7 +203,6 @@ org_gnome_evolution_readdbx_getwidget (EImport *ei,
{
EShell *shell;
EShellBackend *shell_backend;
- EMailSession *session;
GtkWidget *hbox, *w;
GtkLabel *label;
gchar *select_uri = NULL;
@@ -246,10 +245,10 @@ org_gnome_evolution_readdbx_getwidget (EImport *ei,
shell = e_shell_get_default ();
shell_backend = e_shell_get_backend_by_name (shell, "mail");
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
w = em_folder_selection_button_new (
- session, _("Select folder"),
+ E_MAIL_BACKEND (shell_backend),
+ _("Select folder"),
_("Select folder to import into"));
gtk_label_set_mnemonic_widget (label, w);
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 85a117d414..7a5c79e95f 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -515,6 +515,7 @@ action_mail_mark_read_recursive_cb (GtkAction *action,
EShellContent *shell_content;
EShellSidebar *shell_sidebar;
EMFolderTree *folder_tree;
+ EMailBackend *backend;
EMailSession *session;
AsyncContext *context;
CamelStore *store = NULL;
@@ -529,7 +530,9 @@ action_mail_mark_read_recursive_cb (GtkAction *action,
g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL);
- session = em_folder_tree_get_session (folder_tree);
+ backend = em_folder_tree_get_backend (folder_tree);
+ session = e_mail_backend_get_session (backend);
+
folder_uri = em_folder_tree_get_selected_uri (folder_tree);
g_return_if_fail (folder_uri != NULL);
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index e17c50ad72..9ede806b73 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -292,7 +292,6 @@ org_credativ_evolution_readpst_getwidget (EImport *ei, EImportTarget *target, EI
{
EShell *shell;
EShellBackend *shell_backend;
- EMailSession *session;
GtkWidget *hbox, *framebox, *w;
gchar *foldername;
@@ -313,9 +312,11 @@ org_credativ_evolution_readpst_getwidget (EImport *ei, EImportTarget *target, EI
shell = e_shell_get_default ();
shell_backend = e_shell_get_backend_by_name (shell, "mail");
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
- w = em_folder_selection_button_new (session, _("Select folder"), _("Select folder to import into"));
+ w = em_folder_selection_button_new (
+ E_MAIL_BACKEND (shell_backend),
+ _("Select folder"),
+ _("Select folder to import into"));
foldername = get_suggested_foldername ((EImportTargetURI *) target);
((EImportTargetURI *) target)->uri_dest = g_strdup (foldername);
em_folder_selection_button_set_selection ((EMFolderSelectionButton *) w, foldername);