Dismissing the signed on elsewhere minidialog should clear all the errors;

Mon, 17 Dec 2007 12:09:19 +0000

author
Will Thompson <resiak@pidgin.im>
date
Mon, 17 Dec 2007 12:09:19 +0000
changeset 21960
156628be3fe9
parent 21953
4904d97daa2b
child 21961
8ca368922eba

Dismissing the signed on elsewhere minidialog should clear all the errors;
otherwise the minidialog comes back whenever you restart. (Other errors are
already cleared when you close their minidialog.)

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkblist.c	Sun Dec 16 21:23:56 2007 +0000
+++ b/pidgin/gtkblist.c	Mon Dec 17 12:09:19 2007 +0000
@@ -4643,6 +4643,13 @@
 }
 
 static void
+clear_elsewhere_errors(PidginMiniDialog *mini_dialog,
+                       gpointer unused)
+{
+	elsewhere_foreach_account(mini_dialog, purple_account_clear_current_error);
+}
+
+static void
 ensure_signed_on_elsewhere_minidialog(PidginBuddyList *gtkblist)
 {
 	PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
@@ -4657,6 +4664,12 @@
 	pidgin_mini_dialog_add_button(mini_dialog, _("Re-enable"),
 		reconnect_elsewhere_accounts, NULL);
 
+	/* Make dismissing the dialog clear the errors.  The "destroy" signal
+	 * does not appear to fire at quit, which is fortunate!
+	 */
+	g_signal_connect(G_OBJECT(mini_dialog), "destroy",
+		(GCallback) clear_elsewhere_errors, NULL);
+
 	add_error_dialog(gtkblist, GTK_WIDGET(mini_dialog));
 
 	/* Set priv->signed_on_elsewhere to NULL when the dialog is destroyed */

mercurial