changeset 21847:378eb1893499

merge of '7a1ce8ae9c2809b39d1f436d94070523f18993fb' and '94d88332e1e7b8227ef79d0d74873475069c85f4'
author Will Thompson <will.thompson@collabora.co.uk>
date Mon, 17 Dec 2007 12:10:55 +0000
parents 717176f247ab (diff) ced3eaff3465 (current diff)
children 8a52e4cf64c5 aa4810065b91 944f7ada49e0
files
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.c	Mon Dec 17 07:34:21 2007 +0000
+++ b/libpurple/account.c	Mon Dec 17 12:10:55 2007 +0000
@@ -331,6 +331,12 @@
 	if(err == NULL)
 		return node;
 
+	/* It doesn't make sense to have transient errors persist across a
+	 * restart.
+	 */
+	if(!purple_connection_error_is_fatal (err->type))
+		return node;
+
 	child = xmlnode_new_child(node, "type");
 	snprintf(type_str, sizeof(type_str), "%u", err->type);
 	xmlnode_insert_data(child, type_str, -1);
--- a/pidgin/gtkblist.c	Mon Dec 17 07:34:21 2007 +0000
+++ b/pidgin/gtkblist.c	Mon Dec 17 12:10:55 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 */