pidgin: 64ef7230: Do not special case the first group adde...

sadrul at pidgin.im sadrul at pidgin.im
Fri Oct 2 08:55:32 EDT 2009


-----------------------------------------------------------------
Revision: 64ef7230f0e6ed6dfeaac64c32b56f2c055ea757
Ancestor: f4c4106a9ee0234db09b269d26c98f0b8370a3ba
Author: sadrul at pidgin.im
Date: 2009-10-01T18:47:34
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/64ef7230f0e6ed6dfeaac64c32b56f2c055ea757

Modified files:
        libpurple/blist.c

ChangeLog: 

Do not special case the first group added to the buddy list.

Special casing the first group caused the blist-node-added signal to not
emit, and the ui-ops for the node to not get called. Fixes #10410.

-------------- next part --------------
============================================================
--- libpurple/blist.c	25c0a901a1503b70830120fc894fbabe0329973d
+++ libpurple/blist.c	b57dd4fbe3beea4eb1846eea0e9dab7a2fe90a96
@@ -2009,18 +2009,14 @@ void purple_blist_add_group(PurpleGroup 
 
 	ops = purple_blist_get_ui_ops();
 
-	if (!purplebuddylist->root) {
-		purplebuddylist->root = gnode;
-
-		key = g_utf8_collate_key(group->name, -1);
-		g_hash_table_insert(groups_cache, key, group);
-		return;
+	/* if we're moving to overtop of ourselves, do nothing */
+	if (gnode == node) {
+		if (!purplebuddylist->root)
+			node = NULL;
+		else
+			return;
 	}
 
-	/* if we're moving to overtop of ourselves, do nothing */
-	if (gnode == node)
-		return;
-
 	if (purple_find_group(group->name)) {
 		/* This is just being moved */
 


More information about the Commits mailing list