changeset 6732:c49f232b6bd0

[gaim-migrate @ 7259] don't let people try to register blank jabber accounts committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 03 Sep 2003 21:03:59 +0000
parents b4943b9cea2b
children 71c83b8dceac
files src/gtkaccount.c
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkaccount.c	Wed Sep 03 13:08:07 2003 +0000
+++ b/src/gtkaccount.c	Wed Sep 03 21:03:59 2003 +0000
@@ -199,13 +199,15 @@
 static void
 screenname_changed_cb(GtkEntry *entry, AccountPrefsDialog *dialog)
 {
-	if (dialog->ok_button == NULL)
-		return;
+	if (dialog->ok_button)
+		gtk_widget_set_sensitive(dialog->ok_button,
+				*gtk_entry_get_text(entry) != '\0');
+	if (dialog->register_button)
+		gtk_widget_set_sensitive(dialog->register_button,
+				*gtk_entry_get_text(entry) != '\0');
 
-	gtk_widget_set_sensitive(dialog->ok_button,
-				 *gtk_entry_get_text(entry) != '\0');
 }
-	
+
 static void buddy_icon_filesel_delete_cb (GtkWidget *w, AccountPrefsDialog *dialog)
 {
 	if (dialog->buddy_icon_filesel != NULL)
@@ -1224,6 +1226,9 @@
 
 	dialog->register_button = button;
 
+	if (dialog->account == NULL)
+		gtk_widget_set_sensitive(button, FALSE);
+
 	if (dialog->prpl_info->register_user == NULL)
 		gtk_widget_hide(button);