diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-03-12 20:32:13 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-03-12 22:10:09 +0800 |
commit | b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555 (patch) | |
tree | 5a344f9ac5466795f4ef0ef525249faf3514ad7f /modules | |
parent | 3e8e8cb946d4597134c7d98a178c17ef5e835dc6 (diff) | |
download | gsoc2013-evolution-b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555.tar gsoc2013-evolution-b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555.tar.gz gsoc2013-evolution-b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555.tar.bz2 gsoc2013-evolution-b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555.tar.lz gsoc2013-evolution-b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555.tar.xz gsoc2013-evolution-b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555.tar.zst gsoc2013-evolution-b1b884763ee8bc7ce42f44d5a4f7f9ee1fec0555.zip |
Bug 695693 - Handle <authentication> tags during auto-configuration
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mail-config/e-mail-config-smtp-backend.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/modules/mail-config/e-mail-config-smtp-backend.c b/modules/mail-config/e-mail-config-smtp-backend.c index ac54cd4148..c78c0176d9 100644 --- a/modules/mail-config/e-mail-config-smtp-backend.c +++ b/modules/mail-config/e-mail-config-smtp-backend.c @@ -289,11 +289,40 @@ static gboolean mail_config_smtp_backend_auto_configure (EMailConfigServiceBackend *backend, EMailAutoconfig *autoconfig) { + EMailConfigSmtpBackendPrivate *priv; ESource *source; + CamelSettings *settings; + const gchar *mechanism; source = e_mail_config_service_backend_get_source (backend); - return e_mail_autoconfig_set_smtp_details (autoconfig, source); + if (!e_mail_autoconfig_set_smtp_details (autoconfig, source)) + return FALSE; + + /* XXX Need to set the authentication widgets to match the + * auto-configured settings or else the auto-configured + * settings will be overwritten in commit_changes(). + * + * It's not good enough to just set an auto-configured + * flag and skip the widget checks in commit_changes() + * if the flag is TRUE, since the user may revise the + * SMTP settings before committing. */ + + priv = E_MAIL_CONFIG_SMTP_BACKEND_GET_PRIVATE (backend); + + settings = e_mail_config_service_backend_get_settings (backend); + + mechanism = camel_network_settings_get_auth_mechanism ( + CAMEL_NETWORK_SETTINGS (settings)); + + gtk_toggle_button_set_active ( + GTK_TOGGLE_BUTTON (priv->auth_required_toggle), + (mechanism != NULL)); + + if (mechanism != NULL) + e_mail_config_auth_check_set_active_mechanism ( + E_MAIL_CONFIG_AUTH_CHECK (priv->auth_check), + mechanism); } static gboolean |