aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-account-combo-box.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-04-21 07:06:35 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-04-21 19:45:45 +0800
commit397aeade0545457dae034b0287049aa1cbeed782 (patch)
tree00e5f01aaea81e8add946ef0f18130841b07256f /widgets/misc/e-account-combo-box.c
parent69add830e12856ab29b96bdce7335bf18e0a2a6f (diff)
downloadgsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar.gz
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar.bz2
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar.lz
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar.xz
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar.zst
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.zip
Adapt to CamelService changes.
Diffstat (limited to 'widgets/misc/e-account-combo-box.c')
-rw-r--r--widgets/misc/e-account-combo-box.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/widgets/misc/e-account-combo-box.c b/widgets/misc/e-account-combo-box.c
index 40504a0083..e8b0bee6c5 100644
--- a/widgets/misc/e-account-combo-box.c
+++ b/widgets/misc/e-account-combo-box.c
@@ -106,8 +106,7 @@ account_combo_box_choose_account (EAccountComboBox *combo_box)
static gboolean
account_combo_box_test_account (EAccount *account)
{
- CamelStore *store;
- const gchar *url;
+ CamelService *service;
gboolean writable = FALSE;
/* Account must be enabled. */
@@ -123,12 +122,10 @@ account_combo_box_test_account (EAccount *account)
return TRUE;
/* Account must be writable. */
- url = e_account_get_string (account, E_ACCOUNT_SOURCE_URL);
- store = CAMEL_STORE (camel_session_get_service (
- camel_session, url, CAMEL_PROVIDER_STORE, NULL));
- if (store != NULL) {
+ service = camel_session_get_service (camel_session, account->uid);
+ if (CAMEL_IS_STORE (service)) {
+ CamelStore *store = CAMEL_STORE (service);
writable = (store->mode & CAMEL_STORE_WRITE);
- g_object_unref (store);
}
return writable;