From a06e4484b8df804124b5bcf88d94dec5acfba270 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 6 Oct 2010 23:38:52 -0400 Subject: 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. --- mail/e-mail-sidebar.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mail/e-mail-sidebar.c') diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c index 596773423d..a418dc133c 100644 --- a/mail/e-mail-sidebar.c +++ b/mail/e-mail-sidebar.c @@ -474,9 +474,12 @@ e_mail_sidebar_get_type (void) } GtkWidget * -e_mail_sidebar_new (void) +e_mail_sidebar_new (EMailSession *session) { - return g_object_new (E_TYPE_MAIL_SIDEBAR, NULL); + g_return_val_if_fail (E_IS_MAIL_SESSION (session), NULL); + + return g_object_new ( + E_TYPE_MAIL_SIDEBAR, "session", session, NULL); } GKeyFile * -- cgit