changeset 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 bb6fea81e770
children 56915e1b3ba3
files src/account.c src/account.h src/connection.h src/signals.c
diffstat 4 files changed, 18 insertions(+), 8 deletions(-) [+]
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 */
--- a/src/account.h	Sun Mar 27 22:44:59 2005 +0000
+++ b/src/account.h	Sun Mar 27 22:48:04 2005 +0000
@@ -297,7 +297,7 @@
  * @param account   The account.
  * @param status_id The ID of the status.
  * @param active    The active state.
- * @param vargs     The va_list of attributes.
+ * @param args      The va_list of attributes.
  */
 void gaim_account_set_status_vargs(GaimAccount *account,
 								   const char *status_id,
--- a/src/connection.h	Sun Mar 27 22:44:59 2005 +0000
+++ b/src/connection.h	Sun Mar 27 22:48:04 2005 +0000
@@ -125,9 +125,9 @@
  * have called gaim_account_set_status(account, "away").
  * (And this will call gaim_account_connect() automatically).
  *
- * @param account The account the connection should be connecting to.
- * @param register Whether we are registering a new account or just
- *        trying to do a normal signon.
+ * @param account  The account the connection should be connecting to.
+ * @param regist   Whether we are registering a new account or just
+ *                 trying to do a normal signon.
  * @param password The password to use.
  */
 void gaim_connection_new(GaimAccount *account, gboolean regist,
--- a/src/signals.c	Sun Mar 27 22:44:59 2005 +0000
+++ b/src/signals.c	Sun Mar 27 22:48:04 2005 +0000
@@ -288,7 +288,7 @@
 	handler_data->data      = data;
 	handler_data->use_vargs = use_vargs;
 	handler_data->priority = priority;
-	
+
 	signal_data->handlers = g_list_insert_sorted(signal_data->handlers, handler_data, (GCompareFunc)handler_priority);
 	signal_data->handler_count++;
 	signal_data->next_handler_id++;