From 397aeade0545457dae034b0287049aa1cbeed782 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 20 Apr 2011 19:06:35 -0400 Subject: Adapt to CamelService changes. --- e-util/e-account-utils.c | 15 +++++++++------ e-util/e-account-utils.h | 3 +-- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'e-util') 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 -- cgit