diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-04-21 07:06:35 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:55 +0800 |
commit | 0be9b1f878c2f54a0c7f2f5024125813022d81b1 (patch) | |
tree | 29e3c02eb85eb6c0059d7160821f09930bbf9b44 /e-util | |
parent | 7b71f8f18c283032a9edf2f2a191e2c693cb2a61 (diff) | |
download | gsoc2013-evolution-0be9b1f878c2f54a0c7f2f5024125813022d81b1.tar gsoc2013-evolution-0be9b1f878c2f54a0c7f2f5024125813022d81b1.tar.gz gsoc2013-evolution-0be9b1f878c2f54a0c7f2f5024125813022d81b1.tar.bz2 gsoc2013-evolution-0be9b1f878c2f54a0c7f2f5024125813022d81b1.tar.lz gsoc2013-evolution-0be9b1f878c2f54a0c7f2f5024125813022d81b1.tar.xz gsoc2013-evolution-0be9b1f878c2f54a0c7f2f5024125813022d81b1.tar.zst gsoc2013-evolution-0be9b1f878c2f54a0c7f2f5024125813022d81b1.zip |
Adapt to CamelService changes.
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-account-utils.c | 15 | ||||
-rw-r--r-- | e-util/e-account-utils.h | 3 |
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 |