aboutsummaryrefslogtreecommitdiffstats
path: root/capplet/settings/mail-account-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-07 11:38:52 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-13 01:58:59 +0800
commita06e4484b8df804124b5bcf88d94dec5acfba270 (patch)
tree4fa42793d7dc461f2b3767296d76592182c48222 /capplet/settings/mail-account-view.c
parent5e0758bb6934a7859b1d8a247c8fb21c156772cf (diff)
downloadgsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.gz
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.bz2
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.lz
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.xz
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.zst
gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.zip
Give MailSession a permanent home.
Global variables in shared libraries are a bad idea. EMailBackend now owns the MailSession instance, which is actually now EMailSession. Move the blocking utility functions in mail-tools.c to e-mail-session.c and add asynchronous variants. Same approach as Camel. Replace EMailReader.get_shell_backend() with EMailReader.get_backend(), which returns an EMailBackend. Easier access to the EMailSession.
Diffstat (limited to 'capplet/settings/mail-account-view.c')
-rw-r--r--capplet/settings/mail-account-view.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index 9cf9d47754..8001e8ffce 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -33,7 +33,7 @@
#include "mail-view.h"
#include "e-util/e-config.h"
#include "mail/mail-config.h"
-#include "mail/mail-session.h"
+#include "mail/e-mail-session.h"
#include "mail-guess-servers.h"
struct _MailAccountViewPrivate {
@@ -1019,7 +1019,8 @@ next_page (GtkWidget *entry, MailAccountView *mav)
}
static void
-mail_account_view_construct (MailAccountView *view)
+mail_account_view_construct (MailAccountView *view,
+ EMailSession *session)
{
gint i;
EShell *shell;
@@ -1041,7 +1042,9 @@ mail_account_view_construct (MailAccountView *view)
gtk_widget_show (view->pages[0]->box);
view->current_page = 0;
gtk_box_pack_start ((GtkBox *)view, view->scroll, TRUE, TRUE, 0);
- view->edit = em_account_editor_new_for_pages (view->original, EMAE_PAGES, "org.gnome.evolution.mail.config.accountWizard", view->wpages);
+ view->edit = em_account_editor_new_for_pages (
+ view->original, EMAE_PAGES, session,
+ "org.gnome.evolution.mail.config.accountWizard", view->wpages);
gtk_widget_hide (e_config_create_widget (E_CONFIG (view->edit->config)));
view->edit->emae_check_servers = emae_check_servers;
if (!view->original) {
@@ -1077,13 +1080,14 @@ mail_account_view_construct (MailAccountView *view)
}
MailAccountView *
-mail_account_view_new (EAccount *account)
+mail_account_view_new (EAccount *account,
+ EMailSession *session)
{
MailAccountView *view = g_object_new (MAIL_ACCOUNT_VIEW_TYPE, NULL);
view->type = MAIL_VIEW_ACCOUNT;
view->uri = "account://";
view->original = account;
- mail_account_view_construct (view);
+ mail_account_view_construct (view, session);
return view;
}