aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-16 23:40:37 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-12-16 23:58:54 +0800
commita9cfed5938aef37d95c009411f965ebc185547c1 (patch)
treed0c6eb1d5acea6752425169aae47e8f4ed4b55ea /plugins
parentdf85cb1b7a47f713cb775f648f735e642a1bb71b (diff)
downloadgsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.tar
gsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.tar.gz
gsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.tar.bz2
gsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.tar.lz
gsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.tar.xz
gsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.tar.zst
gsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.zip
Avoid passing EMailBackend as much as possible.
More mail API churn... reversing some previous API decisions. I've made some key API changes to EMailSession on the account-mgmt branch which should allow for this, and will hopefully also benefit the "email-factory" branch. EMailBackend barely needs to exist anymore, except as the owner of EMailSession. For several low-level functions, we replace its EMailBackend parameter with EMailSession and EAlertSink parameters; the latter so it can still pass user alerts up the chain.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dbx-import/dbx-importer.c3
-rw-r--r--plugins/pst-import/pst-importer.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index f7bedc856f..5415f4867c 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -262,8 +262,7 @@ org_gnome_evolution_readdbx_getwidget (EImport *ei,
label = GTK_LABEL (w);
w = em_folder_selection_button_new (
- E_MAIL_BACKEND (shell_backend),
- _("Select folder"),
+ session, _("Select folder"),
_("Select folder to import into"));
gtk_label_set_mnemonic_widget (label, w);
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index c7d180151e..5b990539d7 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -528,6 +528,8 @@ org_credativ_evolution_readpst_getwidget (EImport *ei,
{
EShell *shell;
EShellBackend *shell_backend;
+ EMailBackend *backend;
+ EMailSession *session;
GtkWidget *hbox, *framebox, *w, *check;
gchar *foldername;
@@ -545,9 +547,11 @@ org_credativ_evolution_readpst_getwidget (EImport *ei,
shell = e_shell_get_default ();
shell_backend = e_shell_get_backend_by_name (shell, "mail");
+ backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
+
w = em_folder_selection_button_new (
- E_MAIL_BACKEND (shell_backend),
- _("Select folder"),
+ session, _("Select folder"),
_("Select folder to import into"));
foldername = get_suggested_foldername ((EImportTargetURI *) target);
((EImportTargetURI *) target)->uri_dest = g_strdup (foldername);