aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
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 /e-util
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 'e-util')
-rw-r--r--e-util/e-account-utils.c15
-rw-r--r--e-util/e-account-utils.h3
2 files changed, 10 insertions, 8 deletions
diff --git a/e-util/e-account-utils.c b/e-util/e-account-utils.c
index df93fa2202..d6dfa7aea3 100644
--- a/e-util/e-account-utils.c
+++ b/e-util/e-account-utils.c
@@ -324,9 +324,9 @@ e_get_any_enabled_account (void)
* the global #EAccountList that has transport information, or finally %NULL
* if no transport information could be found.
*
- * Returns: an #EAccountService with transport info, or %NULL
+ * Returns: an #EAccount with transport info, or %NULL
**/
-EAccountService *
+EAccount *
e_get_default_transport (void)
{
EAccountList *account_list;
@@ -335,7 +335,7 @@ e_get_default_transport (void)
account = e_get_default_account ();
if (account_has_transport_url (account))
- return account->transport;
+ return account;
account_list = e_get_account_list ();
iterator = e_list_get_iterator (E_LIST (account_list));
@@ -345,7 +345,7 @@ e_get_default_transport (void)
account = (EAccount *) e_iterator_get (iterator);
if (account_has_transport_url (account)) {
g_object_unref (iterator);
- return account->transport;
+ return account;
}
e_iterator_next (iterator);
}
@@ -385,12 +385,15 @@ e_get_subscribable_accounts (CamelSession *session)
account = (EAccount *) e_iterator_get (iterator);
if (account->enabled) {
+ CamelService *service;
const gchar *url;
url = e_account_get_string (
account, E_ACCOUNT_SOURCE_URL);
- store = (CamelStore *) camel_session_get_service (
- session, url, CAMEL_PROVIDER_STORE, NULL);
+ service = camel_session_get_service (
+ session, account->uid);
+ if (CAMEL_IS_STORE (service))
+ store = CAMEL_STORE (service);
}
e_iterator_next (iterator);
diff --git a/e-util/e-account-utils.h b/e-util/e-account-utils.h
index 57ca8400be..ae148cdb36 100644
--- a/e-util/e-account-utils.h
+++ b/e-util/e-account-utils.h
@@ -32,8 +32,7 @@ EAccount * e_get_account_by_uid (const gchar *uid);
EAccount * e_get_account_by_source_url (const gchar *source_url);
EAccount * e_get_account_by_transport_url (const gchar *transport_url);
EAccount * e_get_any_enabled_account (void);
-EAccountService *
- e_get_default_transport (void);
+EAccount * e_get_default_transport (void);
GList * e_get_subscribable_accounts (CamelSession *session);
G_END_DECLS