[Commits] [SCM] claws branch, master, updated. 3.12.0-59-g87b3e7c
mones at claws-mail.org
mones at claws-mail.org
Wed Aug 26 11:05:25 CEST 2015
The branch, master has been updated
via 87b3e7c74ad88c3a60c9c2df93901209766455dd (commit)
from 2ff4e385f8ecdd417096aa859b87e252ab095cd7 (commit)
Summary of changes:
src/gtk/gtkutils.c | 14 +++++++++++---
src/gtk/gtkutils.h | 3 ++-
src/prefs_account.c | 10 ++++++----
src/wizard.c | 7 +++----
4 files changed, 22 insertions(+), 12 deletions(-)
- Log -----------------------------------------------------------------
commit 87b3e7c74ad88c3a60c9c2df93901209766455dd
Author: Ricardo Mones <ricardo at mones.org>
Date: Wed Aug 26 10:59:29 2015 +0200
Fix bug #3209 ‘autoconfig does not use full email address as username’
If a provider supports Auto-Configuring it's likely to be using the
full email address as user ID, not the local machine $USER.
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 8f806f6..f4c1ca8 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1904,13 +1904,19 @@ static void auto_configure_done(const gchar *hostname, gint port, gboolean ssl,
if (data->auth_checkbtn)
gtk_toggle_button_set_active(data->auth_checkbtn, TRUE);
+ /* Set user ID to full email address, which is used by the
+ * majority of providers where auto-configuration works.
+ */
+ if (data->uid_entry)
+ gtk_entry_set_text(data->uid_entry, data->address);
+
gtk_label_set_text(data->info_label, _("Done."));
} else {
gtk_label_set_text(data->info_label, _("Failed."));
}
gtk_widget_show(GTK_WIDGET(data->configure_button));
gtk_widget_hide(GTK_WIDGET(data->cancel_button));
- g_free(data->domain);
+ g_free(data->address);
g_free(data);
}
@@ -1965,14 +1971,16 @@ void auto_configure_service(AutoConfigureData *data)
const gchar *cur_service = data->ssl_service != NULL ? data->ssl_service : data->tls_service;
cm_return_if_fail(cur_service != NULL);
- cm_return_if_fail(data->domain != NULL);
+ cm_return_if_fail(data->address != NULL);
resolver = g_resolver_get_default();
if (resolver != NULL) {
+ const gchar *domain = strchr(data->address, '@') + 1;
+
gtk_label_set_text(data->info_label, _("Configuring..."));
gtk_widget_hide(GTK_WIDGET(data->configure_button));
gtk_widget_show(GTK_WIDGET(data->cancel_button));
- g_resolver_lookup_service_async(resolver, cur_service, "tcp", data->domain,
+ g_resolver_lookup_service_async(resolver, cur_service, "tcp", domain,
data->cancel, resolve_done, data);
}
}
diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h
index 39a8a32..39fdbdb 100644
--- a/src/gtk/gtkutils.h
+++ b/src/gtk/gtkutils.h
@@ -213,7 +213,7 @@ claws_input_add (gint source,
typedef struct _AutoConfigureData {
const gchar *ssl_service;
const gchar *tls_service;
- gchar *domain;
+ gchar *address;
GtkEntry *hostname_entry;
GtkToggleButton *set_port;
@@ -223,6 +223,7 @@ typedef struct _AutoConfigureData {
GtkToggleButton *tls_checkbtn;
GtkToggleButton *ssl_checkbtn;
GtkToggleButton *auth_checkbtn;
+ GtkEntry *uid_entry;
GtkLabel *info_label;
GtkButton *configure_button;
GtkButton *cancel_button;
diff --git a/src/prefs_account.c b/src/prefs_account.c
index b388c85..f0adb80 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -3850,7 +3850,6 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
_("Failed (wrong address)"));
return;
}
- domain = strchr(address, '@') + 1;
if (protocol == A_POP3 || protocol == A_IMAP4) {
recv_data = g_new0(AutoConfigureData, 1);
@@ -3862,7 +3861,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
case A_POP3:
recv_data->ssl_service = "pop3s";
recv_data->tls_service = "pop3";
- recv_data->domain = g_strdup(domain);
+ recv_data->address = g_strdup(address);
recv_data->hostname_entry = GTK_ENTRY(basic_page.recvserv_entry);
recv_data->set_port = GTK_TOGGLE_BUTTON(advanced_page.popport_checkbtn);
recv_data->port = GTK_SPIN_BUTTON(advanced_page.popport_spinbtn);
@@ -3870,11 +3869,12 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
recv_data->ssl_checkbtn = GTK_TOGGLE_BUTTON(ssl_page.pop_ssltunnel_radiobtn);
recv_data->default_port = 110;
recv_data->default_ssl_port = 995;
+ recv_data->uid_entry = GTK_ENTRY(basic_page.uid_entry);
break;
case A_IMAP4:
recv_data->ssl_service = "imaps";
recv_data->tls_service = "imap";
- recv_data->domain = g_strdup(domain);
+ recv_data->address = g_strdup(address);
recv_data->hostname_entry = GTK_ENTRY(basic_page.recvserv_entry);
recv_data->set_port = GTK_TOGGLE_BUTTON(advanced_page.imapport_checkbtn);
recv_data->port = GTK_SPIN_BUTTON(advanced_page.imapport_spinbtn);
@@ -3882,6 +3882,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
recv_data->ssl_checkbtn = GTK_TOGGLE_BUTTON(ssl_page.imap_ssltunnel_radiobtn);
recv_data->default_port = 143;
recv_data->default_ssl_port = 993;
+ recv_data->uid_entry = GTK_ENTRY(basic_page.uid_entry);
break;
default:
cm_return_if_fail(FALSE);
@@ -3897,7 +3898,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
send_data->ssl_service = NULL;
send_data->tls_service = "submission";
- send_data->domain = g_strdup(domain);
+ recv_data->address = g_strdup(address);
send_data->hostname_entry = GTK_ENTRY(basic_page.smtpserv_entry);
send_data->set_port = GTK_TOGGLE_BUTTON(advanced_page.smtpport_checkbtn);
send_data->port = GTK_SPIN_BUTTON(advanced_page.smtpport_spinbtn);
@@ -3905,6 +3906,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
send_data->ssl_checkbtn = NULL;
send_data->default_port = 25;
send_data->default_ssl_port = -1;
+ send_data->uid_entry = NULL;
send_data->auth_checkbtn = GTK_TOGGLE_BUTTON(send_page.smtp_auth_checkbtn);
auto_configure_service(send_data);
diff --git a/src/wizard.c b/src/wizard.c
index 18505f4..c37c815 100644
--- a/src/wizard.c
+++ b/src/wizard.c
@@ -1374,7 +1374,6 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
_("Failed (wrong address)"));
return;
}
- domain = strchr(address, '@') + 1;
if (protocol == A_POP3 || protocol == A_IMAP4) {
recv_data = g_new0(AutoConfigureData, 1);
@@ -1386,7 +1385,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
case A_POP3:
recv_data->ssl_service = "pop3s";
recv_data->tls_service = "pop3";
- recv_data->domain = g_strdup(domain);
+ recv_data->address = g_strdup(address);
recv_data->hostname_entry = GTK_ENTRY(wizard->recv_server);
recv_data->set_port = NULL;
recv_data->port = NULL;
@@ -1398,7 +1397,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
case A_IMAP4:
recv_data->ssl_service = "imaps";
recv_data->tls_service = "imap";
- recv_data->domain = g_strdup(domain);
+ recv_data->address = g_strdup(address);
recv_data->hostname_entry = GTK_ENTRY(wizard->recv_server);
recv_data->set_port = NULL;
recv_data->port = NULL;
@@ -1421,7 +1420,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
send_data->ssl_service = NULL;
send_data->tls_service = "submission";
- send_data->domain = g_strdup(domain);
+ send_data->address = g_strdup(address);
send_data->hostname_entry = GTK_ENTRY(wizard->smtp_server);
send_data->set_port = NULL;
send_data->port = NULL;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list