diff src/account.c @ 10758:c80a609bd747

[gaim-migrate @ 12361] A few other minor changes. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 27 Mar 2005 22:48:04 +0000
parents 8a97b59f0071
children f93ed7f6ecc7
line wrap: on
line diff
--- a/src/account.c	Sun Mar 27 22:44:59 2005 +0000
+++ b/src/account.c	Sun Mar 27 22:48:04 2005 +0000
@@ -767,6 +767,10 @@
 	gaim_connection_new(account, FALSE, entry);
 }
 
+/*
+ * TODO: Make the entry box a required field, and add a
+ *       "save password" checkbox.
+ */
 static void
 request_password(GaimAccount *account)
 {
@@ -774,6 +778,9 @@
 	gchar *escaped;
 	const gchar *username;
 
+	/* Close any previous password request windows */
+	gaim_request_close_with_handle(account);
+
 	username = gaim_account_get_username(account);
 	escaped = g_markup_escape_text(username, strlen(username));
 	primary = g_strdup_printf(_("Enter password for %s (%s)"), escaped,
@@ -805,7 +812,7 @@
 
 		message = g_strdup_printf(_("Missing protocol plugin for %s"),
 			gaim_account_get_username(account));
-		gaim_notify_error(NULL, _("Connection Error"), message, NULL);
+		gaim_notify_error(account, _("Connection Error"), message, NULL);
 		g_free(message);
 		return;
 	}
@@ -866,7 +873,7 @@
 
 	if (g_utf8_collate(new_pass_1, new_pass_2))
 	{
-		gaim_notify_error(NULL, NULL,
+		gaim_notify_error(account, NULL,
 						  _("New passwords do not match."), NULL);
 
 		return;
@@ -875,7 +882,7 @@
 	if (orig_pass == NULL || new_pass_1 == NULL || new_pass_2 == NULL ||
 		*orig_pass == '\0' || *new_pass_1 == '\0' || *new_pass_2 == '\0')
 	{
-		gaim_notify_error(NULL, NULL,
+		gaim_notify_error(account, NULL,
 						  _("Fill out all fields completely."), NULL);
 		return;
 	}
@@ -1697,6 +1704,9 @@
 
 	g_return_if_fail(account != NULL);
 
+	gaim_notify_close_with_handle(account);
+	gaim_request_close_with_handle(account);
+
 	gaim_accounts_remove(account);
 
 	/* Remove this account's buddies */