aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-28 17:38:03 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-28 17:38:03 +0800
commitb3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89 (patch)
tree7190b4353c533028b4a0c27d241d96e883a280ad /modules
parent9744056c5e69227abdcdd55c4bffb674b29bd765 (diff)
parent8f5493140c4da6e81e2c14e77833bfbb56c619f8 (diff)
downloadgsoc2013-evolution-b3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89.tar
gsoc2013-evolution-b3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89.tar.gz
gsoc2013-evolution-b3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89.tar.bz2
gsoc2013-evolution-b3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89.tar.lz
gsoc2013-evolution-b3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89.tar.xz
gsoc2013-evolution-b3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89.tar.zst
gsoc2013-evolution-b3b35231e2ce675202ef9f1a7ccefdc3ab0e0e89.zip
Merge branch 'master' into wip/gsettings
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/e-mail-shell-backend.c7
-rw-r--r--modules/mail/e-mail-shell-view-actions.c8
-rw-r--r--modules/mail/em-account-prefs.c14
3 files changed, 20 insertions, 9 deletions
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 9067437a71..ce563124c6 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -252,8 +252,8 @@ mail_shell_backend_mail_sync (EMailShellBackend *mail_shell_backend)
session = e_mail_backend_get_session (backend);
e_mail_store_foreach (
- E_MAIL_BACKEND (mail_shell_backend),
- (GFunc) mail_shell_backend_sync_store_cb,
+ session, (GFunc)
+ mail_shell_backend_sync_store_cb,
mail_shell_backend);
exit:
@@ -457,9 +457,10 @@ mail_shell_backend_start (EShellBackend *shell_backend)
shell_settings = e_shell_get_shell_settings (shell);
backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
data_dir = e_shell_backend_get_data_dir (shell_backend);
- e_mail_store_init (backend, data_dir);
+ e_mail_store_init (session, data_dir);
enable_search_folders = e_shell_settings_get_boolean (
shell_settings, "mail-enable-search-folders");
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 2595b12d45..08cdfd81e4 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -85,6 +85,7 @@ action_mail_account_disable_cb (GtkAction *action,
EShellBackend *shell_backend;
EShellView *shell_view;
EMailBackend *backend;
+ EMailSession *session;
EMFolderTree *folder_tree;
CamelService *service;
CamelStore *store;
@@ -98,6 +99,7 @@ action_mail_account_disable_cb (GtkAction *action,
shell_backend = e_shell_view_get_shell_backend (shell_view);
backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
store = em_folder_tree_get_selected_store (folder_tree);
@@ -115,7 +117,7 @@ action_mail_account_disable_cb (GtkAction *action,
account->enabled = !account->enabled;
e_account_list_change (account_list, account);
- e_mail_store_remove_by_account (backend, account);
+ e_mail_store_remove_by_account (session, account);
if (account->parent_uid != NULL)
e_account_list_remove (account_list, account);
@@ -225,15 +227,17 @@ action_mail_download_cb (GtkAction *action,
EMailView *mail_view;
EMailReader *reader;
EMailBackend *backend;
+ EMailSession *session;
mail_shell_content = mail_shell_view->priv->mail_shell_content;
mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
reader = E_MAIL_READER (mail_view);
backend = e_mail_reader_get_backend (reader);
+ session = e_mail_backend_get_session (backend);
e_mail_store_foreach (
- backend, (GFunc) action_mail_download_foreach_cb, reader);
+ session, (GFunc) action_mail_download_foreach_cb, reader);
}
static void
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index f4a0a740d5..4bd6c1c968 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -108,7 +108,8 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
g_return_if_fail (account != NULL);
- e_mail_store_add_by_account (prefs->priv->backend, account);
+ session = e_mail_backend_get_session (prefs->priv->backend);
+ e_mail_store_add_by_account (session, account);
}
static void
@@ -118,6 +119,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
EAccountList *account_list;
EMailSession *session;
EAccount *account;
+ EMailSession *session;
gpointer parent;
gint response;
@@ -129,11 +131,13 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
g_return_if_fail (account != NULL);
+ session = e_mail_backend_get_session (prefs->priv->backend);
+
account_list = e_account_tree_view_get_account_list (tree_view);
g_return_if_fail (account_list != NULL);
if (!e_account_list_account_has_proxies (account_list, account)) {
- e_mail_store_remove_by_account (prefs->priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
return;
}
@@ -150,7 +154,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
e_account_list_remove_account_proxies (account_list, account);
- e_mail_store_remove_by_account (prefs->priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
}
static void
@@ -324,11 +328,13 @@ account_prefs_delete_account (EAccountManager *manager)
EAccountList *account_list;
EMailSession *session;
EAccount *account;
+ EMailSession *session;
gboolean has_proxies;
gpointer parent;
gint response;
priv = EM_ACCOUNT_PREFS (manager)->priv;
+ session = e_mail_backend_get_session (priv->backend);
account_list = e_account_manager_get_account_list (manager);
tree_view = e_account_manager_get_tree_view (manager);
@@ -357,7 +363,7 @@ account_prefs_delete_account (EAccountManager *manager)
/* Remove the account from the folder tree. */
if (account->enabled)
- e_mail_store_remove_by_account (priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
/* Remove all the proxies the account has created. */
if (has_proxies)