diff src/gtkaccount.c @ 11985:41d84ac57cb6

[gaim-migrate @ 14278] Getting some stuff out of my tree committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 05 Nov 2005 21:49:44 +0000
parents 1c53ff1e7a0d
children bfbb1798535e
line wrap: on
line diff
--- a/src/gtkaccount.c	Sat Nov 05 20:45:35 2005 +0000
+++ b/src/gtkaccount.c	Sat Nov 05 21:49:44 2005 +0000
@@ -1468,7 +1468,13 @@
 	/* Password */
 	value = gtk_entry_get_text(GTK_ENTRY(dialog->password_entry));
 
-	if (gaim_account_get_remember_password(account) && *value != '\0')
+	/*
+	 * We set the password if this is a new account because new accounts
+	 * will be set to online, and if the user has entered a password into
+	 * the account editor (but has not checked the 'save' box), then we
+	 * don't want to prompt them.
+	 */
+	if ((gaim_account_get_remember_password(account) || new) && (*value != '\0'))
 		gaim_account_set_password(account, value);
 	else
 		gaim_account_set_password(account, NULL);
@@ -1604,7 +1610,6 @@
 	else
 		gaim_signal_emit(gaim_gtk_account_get_handle(), "account-modified", account);
 
-	/* TODO: This doesn't work quite right yet. */
 	if (new) {
 		const char *current_savedstatus_name;
 		const GaimSavedStatus *saved_status;
@@ -1612,20 +1617,6 @@
 		current_savedstatus_name = gaim_prefs_get_string("/core/status/current");
 		saved_status = gaim_savedstatus_find(current_savedstatus_name);
 		gaim_savedstatus_activate_for_account(saved_status, account);
-
-/*
-		This is the old way.  The new way is an improvement.
-		GaimGtkBuddyList *gtkblist;
-		GtkGaimStatusBox *status_box;
-		char *status_type_id;
-
-		gtkblist = GAIM_GTK_BLIST(gaim_get_blist());
-		status_box = GTK_GAIM_STATUS_BOX(gtkblist->statusbox);
-
-		status_type_id = gtk_gaim_status_box_get_active_type(status_box);
-		gaim_presence_set_status_active(account->presence, status_type_id, TRUE);
-		g_free(status_type_id);
-*/
 	}
 
 	return account;