diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-07 11:38:52 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-13 01:58:59 +0800 |
commit | a06e4484b8df804124b5bcf88d94dec5acfba270 (patch) | |
tree | 4fa42793d7dc461f2b3767296d76592182c48222 /modules/mail/e-mail-shell-content.c | |
parent | 5e0758bb6934a7859b1d8a247c8fb21c156772cf (diff) | |
download | gsoc2013-evolution-a06e4484b8df804124b5bcf88d94dec5acfba270.tar.gz 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 'modules/mail/e-mail-shell-content.c')
-rw-r--r-- | modules/mail/e-mail-shell-content.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 6ba52737ba..fd1db02fa8 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -244,6 +244,20 @@ mail_shell_content_get_action_group (EMailReader *reader) return E_SHELL_WINDOW_ACTION_GROUP_MAIL (shell_window); } +static EMailBackend * +mail_shell_content_get_backend (EMailReader *reader) +{ + EMailShellContentPrivate *priv; + + priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); + + /* Forward this to our internal EMailView, which + * also implements the EMailReader interface. */ + reader = E_MAIL_READER (priv->mail_view); + + return e_mail_reader_get_backend (reader); +} + static EMFormatHTML * mail_shell_content_get_formatter (EMailReader *reader) { @@ -300,20 +314,6 @@ mail_shell_content_get_popup_menu (EMailReader *reader) return e_mail_reader_get_popup_menu (reader); } -static EShellBackend * -mail_shell_content_get_shell_backend (EMailReader *reader) -{ - EMailShellContentPrivate *priv; - - priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (reader); - - /* Forward this to our internal EMailView, which - * also implements the EMailReader interface. */ - reader = E_MAIL_READER (priv->mail_view); - - return e_mail_reader_get_shell_backend (reader); -} - static GtkWindow * mail_shell_content_get_window (EMailReader *reader) { @@ -412,11 +412,11 @@ static void mail_shell_content_reader_init (EMailReaderInterface *interface) { interface->get_action_group = mail_shell_content_get_action_group; + interface->get_backend = mail_shell_content_get_backend; interface->get_formatter = mail_shell_content_get_formatter; interface->get_hide_deleted = mail_shell_content_get_hide_deleted; interface->get_message_list = mail_shell_content_get_message_list; interface->get_popup_menu = mail_shell_content_get_popup_menu; - interface->get_shell_backend = mail_shell_content_get_shell_backend; interface->get_window = mail_shell_content_get_window; interface->set_folder = mail_shell_content_set_folder; interface->show_search_bar = mail_shell_content_show_search_bar; |