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. --- plugins/mark-all-read/mark-all-read.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/mark-all-read') diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c index ffbbbccb2e..62b8102d9d 100644 --- a/plugins/mark-all-read/mark-all-read.c +++ b/plugins/mark-all-read/mark-all-read.c @@ -421,15 +421,19 @@ action_mail_mark_read_recursive_cb (GtkAction *action, { EShellSidebar *shell_sidebar; EMFolderTree *folder_tree; + EMailSession *session; gchar *folder_uri; shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL); + + session = em_folder_tree_get_session (folder_tree); + folder_uri = em_folder_tree_get_selected_uri (folder_tree); g_return_if_fail (folder_uri != NULL); mail_get_folder ( - folder_uri, 0, mar_got_folder, + session, folder_uri, 0, mar_got_folder, NULL, mail_msg_unordered_push); g_object_unref (folder_tree); -- cgit v1.2.3