diff options
author | Milan Crha <mcrha@redhat.com> | 2014-07-08 17:32:27 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-07-08 17:32:27 +0800 |
commit | e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff (patch) | |
tree | b691ba0efe9586c01efe6c6e9060c9cf4b8093a2 | |
parent | 50bda1bad222082488d3d9bc9fe1d0fb3867e974 (diff) | |
download | gsoc2013-evolution-e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff.tar gsoc2013-evolution-e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff.tar.gz gsoc2013-evolution-e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff.tar.bz2 gsoc2013-evolution-e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff.tar.lz gsoc2013-evolution-e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff.tar.xz gsoc2013-evolution-e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff.tar.zst gsoc2013-evolution-e837eb24ea6ae6bcd4d9fc3d6aaa852fe7112fff.zip |
SMTP part of a new mail account dialog doesn't update UI properly
Using "Server requires authentication" checkbox doesn't update
the new mail account dialog properly, thus it seems like a username
is required when the server does not require authentication. It's due
to the dialog being updated properly only on CamelSettings changes,
while this checkbox doesn't have any direct connection to any
CamelSettings property.
-rw-r--r-- | modules/mail-config/e-mail-config-smtp-backend.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/mail-config/e-mail-config-smtp-backend.c b/modules/mail-config/e-mail-config-smtp-backend.c index 368ffd8106..8c1d8dc621 100644 --- a/modules/mail-config/e-mail-config-smtp-backend.c +++ b/modules/mail-config/e-mail-config-smtp-backend.c @@ -24,6 +24,7 @@ #include <libebackend/libebackend.h> #include <mail/e-mail-config-auth-check.h> +#include <mail/e-mail-config-page.h> #include <mail/e-mail-config-service-page.h> #define E_MAIL_CONFIG_SMTP_BACKEND_GET_PRIVATE(obj) \ @@ -45,6 +46,18 @@ G_DEFINE_DYNAMIC_TYPE ( E_TYPE_MAIL_CONFIG_SERVICE_BACKEND) static void +server_requires_auth_toggled_cb (GtkToggleButton *toggle, + EMailConfigServiceBackend *backend) +{ + EMailConfigServicePage *page; + + g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend)); + + page = e_mail_config_service_backend_get_page (backend); + e_mail_config_page_changed (E_MAIL_CONFIG_PAGE (page)); +} + +static void mail_config_smtp_backend_insert_widgets (EMailConfigServiceBackend *backend, GtkBox *parent) { @@ -125,6 +138,9 @@ mail_config_smtp_backend_insert_widgets (EMailConfigServiceBackend *backend, priv->auth_required_toggle = widget; /* do not reference */ gtk_widget_show (widget); + g_signal_connect_object (widget, "toggled", + G_CALLBACK (server_requires_auth_toggled_cb), backend, 0); + text = _("Security"); markup = g_markup_printf_escaped ("<b>%s</b>", text); widget = gtk_label_new (markup); |