[Commits] [SCM] claws branch, master, updated. 3.15.0-23-g6c2eb37

ticho at claws-mail.org ticho at claws-mail.org
Tue Apr 11 18:10:47 CEST 2017


The branch, master has been updated
       via  6c2eb37a0cef876017822a4ddae92c7af1125280 (commit)
      from  dd3dd86abd31fa8eb280a6c7cd6e710e01d5ac69 (commit)

Summary of changes:
 src/editldap.c |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 6c2eb37a0cef876017822a4ddae92c7af1125280
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Apr 11 18:10:14 2017 +0200

    Add "Show password" checkbox next to LDAP server password field.

diff --git a/src/editldap.c b/src/editldap.c
index 9492e7b..70d53aa 100644
--- a/src/editldap.c
+++ b/src/editldap.c
@@ -668,12 +668,22 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
 	ldapedit.check_matchoption = check_matchoption;
 }
 
+static void showpwd_checkbtn_toggled(GtkToggleButton *button,
+		gpointer user_data)
+{
+	gboolean active = gtk_toggle_button_get_active(button);
+	GtkWidget *entry = GTK_WIDGET(user_data);
+
+	gtk_entry_set_visibility(GTK_ENTRY(entry), active);
+}
+
 static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *vbox;
 	GtkWidget *table;
 	GtkWidget *label;
 	GtkWidget *entry_bindDN;
 	GtkWidget *entry_bindPW;
+	GtkWidget *showpwd_checkbtn;
 	GtkWidget *hbox_spin;
 	GtkAdjustment *spinbtn_timeout_adj;
 	GtkWidget *spinbtn_timeout;
@@ -704,7 +714,7 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 
 	entry_bindDN = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_bindDN, 1, 2, top, (top + 1),
+	gtk_table_attach(GTK_TABLE(table), entry_bindDN, 1, 3, top, (top + 1),
 		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
 	CLAWS_SET_TIP(entry_bindDN, _( 
@@ -728,6 +738,13 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
 		"The password to be used when connecting as the \"Bind DN\" " \
 		"user." ));
 
+	showpwd_checkbtn = gtk_check_button_new_with_label (_("Show password"));
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(showpwd_checkbtn), FALSE);
+	g_signal_connect(G_OBJECT(showpwd_checkbtn), "toggled",
+			G_CALLBACK(showpwd_checkbtn_toggled), entry_bindPW);
+	gtk_table_attach(GTK_TABLE(table), showpwd_checkbtn, 2, 3, top, (top + 1),
+			0, 0, 0, 0);
+
 	/* Next row */
 	++top;
 	label = gtk_label_new(_("Timeout (secs)"));

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list