aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-account-editor.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-31 07:05:30 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:58 +0800
commitdb1a2dd8aad57fb222daa6f82838b33a26f8e742 (patch)
tree42d90c8e93a4cf035bb9c92de676ad8dcca36fe3 /mail/em-account-editor.c
parent629700ced0d5f84031e514cdb31cd97f985a2598 (diff)
downloadgsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.gz
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.bz2
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.lz
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.xz
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.zst
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.zip
Miscellaneous cleanups.
Reducing diff noise with the account-mgmt branch. Trying to erode our dependency on EAccount as much as possible, or at least isolate its usage, to make things easier for me on the branch.
Diffstat (limited to 'mail/em-account-editor.c')
-rw-r--r--mail/em-account-editor.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 8c184ae071..93e61a2d9f 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -3141,7 +3141,9 @@ emae_defaults_page (EConfig *ec,
EMFolderSelectionButton *button;
CamelProviderFlags flags;
CamelSettings *settings;
+ CamelStore *store = NULL;
EMailBackend *backend;
+ EMailSession *session;
EAccount *account;
GtkWidget *widget;
GtkBuilder *builder;
@@ -3156,6 +3158,18 @@ emae_defaults_page (EConfig *ec,
account = em_account_editor_get_modified_account (emae);
backend = em_account_editor_get_backend (emae);
+ session = e_mail_backend_get_session (backend);
+
+ if (account != NULL) {
+ CamelService *service;
+
+ service = camel_session_get_service (
+ CAMEL_SESSION (session), account->uid);
+
+ if (CAMEL_IS_STORE (service))
+ store = CAMEL_STORE (service);
+ }
+
settings = emae->priv->source.settings;
/* Make sure we have a valid EMailBackend. */
@@ -3182,8 +3196,8 @@ emae_defaults_page (EConfig *ec,
widget = e_builder_get_widget (builder, "trash_folder_butt");
button = EM_FOLDER_SELECTION_BUTTON (widget);
- em_folder_selection_button_set_account (button, account);
em_folder_selection_button_set_backend (button, backend);
+ em_folder_selection_button_set_store (button, store);
priv->trash_folder_button = GTK_BUTTON (button);
g_signal_connect (
@@ -3227,8 +3241,8 @@ emae_defaults_page (EConfig *ec,
widget = e_builder_get_widget (builder, "junk_folder_butt");
button = EM_FOLDER_SELECTION_BUTTON (widget);
- em_folder_selection_button_set_account (button, account);
em_folder_selection_button_set_backend (button, backend);
+ em_folder_selection_button_set_store (button, store);
priv->junk_folder_button = GTK_BUTTON (button);
g_signal_connect (