# HG changeset patch # User Will Thompson # Date 1197893455 0 # Node ID 378eb189349961bfdcd5c3d7de63325ae1680135 # Parent 717176f247ab08f600ce009f9c488ecb64980637# Parent ced3eaff346518c5c7608e3897be41479657dd69 merge of '7a1ce8ae9c2809b39d1f436d94070523f18993fb' and '94d88332e1e7b8227ef79d0d74873475069c85f4' diff -r ced3eaff3465 -r 378eb1893499 libpurple/account.c --- 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); diff -r ced3eaff3465 -r 378eb1893499 pidgin/gtkblist.c --- 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 */