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.
This commit is contained in:
@ -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) \
|
||||
@ -44,6 +45,18 @@ G_DEFINE_DYNAMIC_TYPE (
|
||||
e_mail_config_smtp_backend,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user