aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-sidebar.c
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 /modules/mail/e-mail-shell-sidebar.c
parentdf85cb1b7a47f713cb775f648f735e642a1bb71b (diff)
downloadgsoc2013-evolution-a9cfed5938aef37d95c009411f965ebc185547c1.tar.gz
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 'modules/mail/e-mail-shell-sidebar.c')
-rw-r--r--modules/mail/e-mail-shell-sidebar.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/mail/e-mail-shell-sidebar.c b/modules/mail/e-mail-shell-sidebar.c
index 698c02119d..857a0d6e0f 100644
--- a/modules/mail/e-mail-shell-sidebar.c
+++ b/modules/mail/e-mail-shell-sidebar.c
@@ -126,6 +126,9 @@ mail_shell_sidebar_constructed (GObject *object)
EShellWindow *shell_window;
EShellView *shell_view;
EShell *shell;
+ EMailBackend *backend;
+ EMailSession *session;
+ EAlertSink *alert_sink;
GtkTreeSelection *selection;
GtkTreeView *tree_view;
GtkWidget *container;
@@ -142,6 +145,11 @@ mail_shell_sidebar_constructed (GObject *object)
shell = e_shell_window_get_shell (shell_window);
shell_settings = e_shell_get_shell_settings (shell);
+ backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
+
+ alert_sink = E_ALERT_SINK (shell_sidebar);
+
mail_shell_sidebar = E_MAIL_SHELL_SIDEBAR (object);
/* Build sidebar widgets. */
@@ -159,9 +167,7 @@ mail_shell_sidebar_constructed (GObject *object)
container = widget;
- widget = e_mail_sidebar_new (
- E_MAIL_BACKEND (shell_backend),
- E_ALERT_SINK (shell_sidebar));
+ widget = e_mail_sidebar_new (session, alert_sink);
gtk_container_add (GTK_CONTAINER (container), widget);
mail_shell_sidebar->priv->folder_tree = g_object_ref (widget);
gtk_widget_show (widget);