Don't update the error in the buddy list if it hasn't changed.

Wed, 14 Nov 2007 12:40:48 +0000

author
Will Thompson <resiak@pidgin.im>
date
Wed, 14 Nov 2007 12:40:48 +0000
changeset 21586
1f6bd334d6a0
parent 21585
7bdd57d17c4b
child 21587
5c4493b21ed8

Don't update the error in the buddy list if it hasn't changed.

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkblist.c	Wed Nov 14 12:26:52 2007 +0000
+++ b/pidgin/gtkblist.c	Wed Nov 14 12:40:48 2007 +0000
@@ -4721,6 +4721,16 @@
 	else
 		pidgin_blist_update_account_error_state(account, NULL);
 
+	/* Don't bother updating the error if it hasn't changed.  This stops
+	 * URGENT being repeatedly set for network errors whenever they try to
+	 * reconnect.
+	 */
+	if ((old == new) ||
+	    (old != NULL && new != NULL && old->type == new->type
+	     && g_str_equal(old->description, new->description))
+	   )
+		return;
+
 	if (old) {
 		if(old->type == PURPLE_CONNECTION_ERROR_NAME_IN_USE)
 			remove_from_signed_on_elsewhere(account);

mercurial