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 /mail/em-account-editor.c | |
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 'mail/em-account-editor.c')
-rw-r--r-- | mail/em-account-editor.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 639c82f251..f51f5edcae 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -1932,9 +1932,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service) } static void -emae_check_authtype_done (const gchar *uri, - CamelProviderType type, - GList *types, +emae_check_authtype_done (GList *types, gpointer data) { EMAccountEditorService **pservice = data; @@ -2000,6 +1998,7 @@ emae_check_authtype (GtkWidget *w, EAccount *account; GtkWidget *editor; const gchar *uri; + gchar *uid; account = em_account_editor_get_modified_account (emae); editor = E_CONFIG (service->emae->config)->window; @@ -2017,12 +2016,18 @@ emae_check_authtype (GtkWidget *w, if (editor != NULL) gtk_widget_set_sensitive (editor, FALSE); + if (service->type == CAMEL_PROVIDER_TRANSPORT) + uid = g_strconcat (account->uid, "-transport", NULL); + else + uid = g_strdup (account->uid); + pservice = g_new0 (EMAccountEditorService *, 1); *pservice = service; service->check_data = pservice; service->check_id = mail_check_service ( - session, uri, service->type, - emae_check_authtype_done, pservice); + session, uid, emae_check_authtype_done, pservice); + + g_free (uid); } static void @@ -3772,21 +3777,9 @@ emae_commit (EConfig *ec, GSList *items, gpointer data) && emae->priv->source.provider && (emae->priv->source.provider->flags & CAMEL_PROVIDER_IS_STORAGE)) { EMailSession *session; - CamelStore *store; - const gchar *uri; session = em_account_editor_get_session (emae); - uri = e_account_get_string ( - modified_account, E_ACCOUNT_SOURCE_URL); - store = (CamelStore *) camel_session_get_service ( - CAMEL_SESSION (session), uri, - CAMEL_PROVIDER_STORE, NULL); - if (store != NULL) { - e_mail_store_add ( - session, store, - modified_account->name); - g_object_unref (store); - } + e_mail_store_add_by_account (session, account); } } |