changeset 2101:dd3aa315519d

[gaim-migrate @ 2111] more NO_PASS stuff committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 01 Aug 2001 19:22:07 +0000
parents a93aeb6f813d
children 899c22dcee42
files src/multi.c
diffstat 1 files changed, 18 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/multi.c	Wed Aug 01 19:11:42 2001 +0000
+++ b/src/multi.c	Wed Aug 01 19:22:07 2001 +0000
@@ -369,8 +369,6 @@
 	GtkWidget *name;
 	GtkWidget *pass;
 	GtkWidget *rempass;
-	
-	struct prpl *p = NULL;
 
 	vbox = gtk_vbox_new(FALSE, 5);
 	gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
@@ -418,17 +416,11 @@
 		gtk_entry_set_text(GTK_ENTRY(name), u->username);
 		gtk_entry_set_text(GTK_ENTRY(pass), u->password);
 		gtk_entry_set_editable(GTK_ENTRY(name), FALSE);
-		p = find_prpl(u->tmp_protocol);
 	} else {
 		tmpusr.name = name;
 		tmpusr.pwdbox = pwdbox;
 		tmpusr.pass = pass;
 		tmpusr.rempass = rempass;
-		p = find_prpl(tmpusr.tmp_protocol);
-	}
-	if (p->options & OPT_PROTO_NO_PASSWORD) {
-		gtk_widget_hide(pwdbox);
-		gtk_widget_hide(rempass);
 	}
 }
 
@@ -468,6 +460,8 @@
 	GtkWidget *hbox;
 	GtkWidget *button;
 
+	struct prpl *p;
+
 	if (!u && newmod) {
 		gtk_widget_show(newmod);
 		return;
@@ -520,6 +514,20 @@
 	}
 
 	gtk_widget_show_all(mod);
+	
+	if (u) {
+		p = find_prpl(u->tmp_protocol);
+		if (p->options & OPT_PROTO_NO_PASSWORD) {
+			gtk_widget_hide(u->pwdbox);
+			gtk_widget_hide(u->rempass);
+		}
+	} else {
+		p = find_prpl(tmpusr.tmp_protocol);
+		if (p->options & OPT_PROTO_NO_PASSWORD) {
+			gtk_widget_hide(tmpusr.pwdbox);
+			gtk_widget_hide(tmpusr.rempass);
+		}
+	}
 }
 
 static void add_acct(GtkWidget *w, gpointer d)
@@ -636,7 +644,8 @@
 		row = (int)l->data;
 		u = g_list_nth_data(aim_users, row);
 		if (!u->gc) {
-			if (!u->password[0]) {
+			struct prpl *p = find_prpl(u->protocol);
+			if (p && !(p->options & OPT_PROTO_NO_PASSWORD) && !u->password[0]) {
 				do_pass_dlg(u);
 			} else {
 #ifdef USE_APPLET