[Commits] [SCM] claws branch, master, updated. 3.12.0-66-g4721a11

mones at claws-mail.org mones at claws-mail.org
Fri Aug 28 11:25:39 CEST 2015


The branch, master has been updated
       via  4721a112b006dab3524fad9ad1c641c1eac73024 (commit)
      from  4f858094265832164bc3e44b68bad2312dfbdea8 (commit)

Summary of changes:
 src/gtk/gtkutils.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 4721a112b006dab3524fad9ad1c641c1eac73024
Author: Christian Hesse <mail at eworm.de>
Date:   Fri Aug 28 11:03:57 2015 +0200

    Auto-configuration: set port only when not default

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index f4c1ca8..4eabff0 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1878,13 +1878,16 @@ static void auto_configure_done(const gchar *hostname, gint port, gboolean ssl,
 			gtk_entry_set_text(data->hostname_entry, hostname);
 		if (data->set_port)
 			gtk_toggle_button_set_active(data->set_port,
-				(ssl && port == data->default_ssl_port) || (!ssl && port == data->default_port));
+				(ssl && port != data->default_ssl_port) || (!ssl && port != data->default_port));
 		if (data->port)
 			gtk_spin_button_set_value(data->port, port);
 		else if (data->hostname_entry) {
-			gchar *tmp = g_strdup_printf("%s:%d", hostname, port);
-			gtk_entry_set_text(data->hostname_entry, tmp);
-			g_free(tmp);
+			if ((ssl && port != data->default_ssl_port) || (!ssl && port != data->default_port)) {
+				gchar *tmp = g_strdup_printf("%s:%d", hostname, port);
+				gtk_entry_set_text(data->hostname_entry, tmp);
+				g_free(tmp);
+			} else
+				gtk_entry_set_text(data->hostname_entry, hostname);
 		}
 
 		if (ssl && data->ssl_checkbtn) {

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list