diff src/multi.c @ 2153:0befa2d2e540

[gaim-migrate @ 2163] moving mail notifications to the core. this makes things much easier on the protocols. next steps: make buddy right-click menu stuff generated by the core (based on information provided by the protocols, similar to the away menu stuff); make entry-widget protocol-specific user options generated by the core based on what the protocols tell it (in a similar way). committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 22 Aug 2001 21:11:58 +0000
parents fa3dfde4727e
children cff133e0ec0c
line wrap: on
line diff
--- a/src/multi.c	Wed Aug 22 17:25:33 2001 +0000
+++ b/src/multi.c	Wed Aug 22 21:11:58 2001 +0000
@@ -292,6 +292,13 @@
 			gtk_widget_show(u->pwdbox);
 			gtk_widget_show(u->rempass);
 		}
+		if (!(p->options & OPT_PROTO_MAIL_CHECK) &&
+		     (q->options & OPT_PROTO_MAIL_CHECK)) {
+			gtk_widget_show(u->checkmail);
+		} else if ((p->options & OPT_PROTO_MAIL_CHECK) &&
+			  !(q->options & OPT_PROTO_MAIL_CHECK)) {
+			gtk_widget_hide(u->checkmail);
+		}
 		u->tmp_protocol = proto;
 		generate_prpl_options(u, u->main);
 	} else if (!u && (tmpusr.tmp_protocol != proto)) {
@@ -308,6 +315,13 @@
 			gtk_widget_show(tmpusr.pwdbox);
 			gtk_widget_show(tmpusr.rempass);
 		}
+		if (!(p->options & OPT_PROTO_MAIL_CHECK) &&
+		     (q->options & OPT_PROTO_MAIL_CHECK)) {
+			gtk_widget_show(tmpusr.checkmail);
+		} else if ((p->options & OPT_PROTO_MAIL_CHECK) &&
+			  !(q->options & OPT_PROTO_MAIL_CHECK)) {
+			gtk_widget_hide(tmpusr.checkmail);
+		}
 		tmpusr.tmp_protocol = tmpusr.protocol = proto;
 		generate_prpl_options(NULL, newmain);
 	}
@@ -369,6 +383,7 @@
 	GtkWidget *name;
 	GtkWidget *pass;
 	GtkWidget *rempass;
+	GtkWidget *checkmail;
 
 	vbox = gtk_vbox_new(FALSE, 5);
 	gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
@@ -405,6 +420,7 @@
 	rempass = acct_button(_("Remember Password"), u, OPT_USR_REM_PASS, vbox);
 	acct_button(_("Auto-Login"), u, OPT_USR_AUTO, vbox);
 	/*acct_button(_("Send KeepAlive packet (6 bytes/second)"), u, OPT_USR_KEEPALV, vbox);*/
+	checkmail = acct_button(_("New Mail Notifications"), u, OPT_USR_MAIL_CHECK, vbox);
 
 	gtk_widget_show_all(vbox);
 
@@ -413,6 +429,7 @@
 		u->pwdbox = pwdbox;
 		u->pass = pass;
 		u->rempass = rempass;
+		u->checkmail = checkmail;
 		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);
@@ -421,6 +438,7 @@
 		tmpusr.pwdbox = pwdbox;
 		tmpusr.pass = pass;
 		tmpusr.rempass = rempass;
+		tmpusr.checkmail = checkmail;
 	}
 }
 
@@ -521,12 +539,16 @@
 			gtk_widget_hide(u->pwdbox);
 			gtk_widget_hide(u->rempass);
 		}
+		if (!(p->options & OPT_PROTO_MAIL_CHECK))
+			gtk_widget_hide(u->checkmail);
 	} else {
 		p = find_prpl(tmpusr.tmp_protocol);
 		if (p->options & OPT_PROTO_NO_PASSWORD) {
 			gtk_widget_hide(tmpusr.pwdbox);
 			gtk_widget_hide(tmpusr.rempass);
 		}
+		if (!(p->options & OPT_PROTO_MAIL_CHECK))
+			gtk_widget_hide(tmpusr.checkmail);
 	}
 }