changeset 15329:f19b9b39d71a

[gaim-migrate @ 18119] sf patch #1629012, from betalb Use hardcoded invisible char only if the default is * committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 13 Jan 2007 18:46:55 +0000
parents 5dee50faa9ef
children 3abb476aab94
files gtk/gtkaccount.c gtk/gtkblist.c gtk/gtkpluginpref.c gtk/gtkprefs.c gtk/gtkrequest.c
diffstat 5 files changed, 18 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkaccount.c	Sat Jan 13 09:50:16 2007 +0000
+++ b/gtk/gtkaccount.c	Sat Jan 13 18:46:55 2007 +0000
@@ -482,7 +482,8 @@
 	/* Password */
 	dialog->password_entry = gtk_entry_new();
 	gtk_entry_set_visibility(GTK_ENTRY(dialog->password_entry), FALSE);
-	gtk_entry_set_invisible_char(GTK_ENTRY(dialog->password_entry), GAIM_INVISIBLE_CHAR);
+	if (gtk_entry_get_invisible_char(GTK_ENTRY(dialog->password_entry)) == '*')
+		gtk_entry_set_invisible_char(GTK_ENTRY(dialog->password_entry), GAIM_INVISIBLE_CHAR);
 	dialog->password_box = add_pref_box(dialog, vbox, _("Password:"),
 										  dialog->password_entry);
 
@@ -777,7 +778,8 @@
 				if (gaim_account_option_get_masked(option))
 				{
 					gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
-					gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
+					if (gtk_entry_get_invisible_char(GTK_ENTRY(entry)) == '*')
+						gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
 				}
 
 				if (str_value != NULL)
@@ -1010,7 +1012,8 @@
 	/* Password */
 	dialog->proxy_pass_entry = gtk_entry_new();
 	gtk_entry_set_visibility(GTK_ENTRY(dialog->proxy_pass_entry), FALSE);
-	gtk_entry_set_invisible_char(GTK_ENTRY(dialog->proxy_pass_entry), GAIM_INVISIBLE_CHAR);
+	if (gtk_entry_get_invisible_char(GTK_ENTRY(dialog->proxy_pass_entry)) == '*')
+		gtk_entry_set_invisible_char(GTK_ENTRY(dialog->proxy_pass_entry), GAIM_INVISIBLE_CHAR);
 	add_pref_box(dialog, vbox2, _("Pa_ssword:"), dialog->proxy_pass_entry);
 
 	if (dialog->account != NULL &&
--- a/gtk/gtkblist.c	Sat Jan 13 09:50:16 2007 +0000
+++ b/gtk/gtkblist.c	Sat Jan 13 18:46:55 2007 +0000
@@ -623,7 +623,8 @@
 			if (pce->secret)
 			{
 				gtk_entry_set_visibility(GTK_ENTRY(input), FALSE);
-				gtk_entry_set_invisible_char(GTK_ENTRY(input), GAIM_INVISIBLE_CHAR);
+				if (gtk_entry_get_invisible_char(GTK_ENTRY(input)) == '*')
+					gtk_entry_set_invisible_char(GTK_ENTRY(input), GAIM_INVISIBLE_CHAR);
 			}
 			gtk_box_pack_end(GTK_BOX(rowbox), input, TRUE, TRUE, 0);
 			g_signal_connect(G_OBJECT(input), "changed",
@@ -5445,7 +5446,8 @@
 			if (pce->secret)
 			{
 				gtk_entry_set_visibility(GTK_ENTRY(input), FALSE);
-				gtk_entry_set_invisible_char(GTK_ENTRY(input), GAIM_INVISIBLE_CHAR);
+				if (gtk_entry_get_invisible_char(GTK_ENTRY(input)) == '*')
+					gtk_entry_set_invisible_char(GTK_ENTRY(input), GAIM_INVISIBLE_CHAR);
 			}
 			gtk_box_pack_end(GTK_BOX(rowbox), input, TRUE, TRUE, 0);
 			g_signal_connect(G_OBJECT(input), "changed",
--- a/gtk/gtkpluginpref.c	Sat Jan 13 09:50:16 2007 +0000
+++ b/gtk/gtkpluginpref.c	Sat Jan 13 18:46:55 2007 +0000
@@ -116,7 +116,8 @@
 				if (gaim_plugin_pref_get_masked(pref))
 				{
 					gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
-					gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
+					if (gtk_entry_get_invisible_char(GTK_ENTRY(entry)) == '*')
+						gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
 				}
 				g_signal_connect(G_OBJECT(entry), "changed",
 								 G_CALLBACK(entry_cb),
--- a/gtk/gtkprefs.c	Sat Jan 13 09:50:16 2007 +0000
+++ b/gtk/gtkprefs.c	Sat Jan 13 18:46:55 2007 +0000
@@ -1175,7 +1175,8 @@
 		gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
 		gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 1, 2, GTK_FILL , 0, 0, 0);
 		gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
-		gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
+		if (gtk_entry_get_invisible_char(GTK_ENTRY(entry)) == '*')
+			gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
 		g_signal_connect(G_OBJECT(entry), "changed",
 				 G_CALLBACK(proxy_print_option), (void *)PROXYPASS);
 
--- a/gtk/gtkrequest.c	Sat Jan 13 09:50:16 2007 +0000
+++ b/gtk/gtkrequest.c	Sat Jan 13 18:46:55 2007 +0000
@@ -423,7 +423,8 @@
 			if (masked)
 			{
 				gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
-				gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
+				if (gtk_entry_get_invisible_char(GTK_ENTRY(entry)) == '*')
+					gtk_entry_set_invisible_char(GTK_ENTRY(entry), GAIM_INVISIBLE_CHAR);
 			}
 		}
 	}
@@ -760,7 +761,8 @@
 		if (gaim_request_field_string_is_masked(field))
 		{
 			gtk_entry_set_visibility(GTK_ENTRY(widget), FALSE);
-			gtk_entry_set_invisible_char(GTK_ENTRY(widget),	GAIM_INVISIBLE_CHAR);
+			if (gtk_entry_get_invisible_char(GTK_ENTRY(widget)) == '*')
+				gtk_entry_set_invisible_char(GTK_ENTRY(widget),	GAIM_INVISIBLE_CHAR);
 		}
 
 		gtk_editable_set_editable(GTK_EDITABLE(widget),