changeset 28312:ec2782028fc5

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.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 01 Oct 2009 18:47:34 +0000
parents f22eadbdc5d1
children e601e2c5bb9e
files libpurple/blist.c
diffstat 1 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/blist.c	Wed Sep 30 17:55:16 2009 +0000
+++ b/libpurple/blist.c	Thu Oct 01 18:47:34 2009 +0000
@@ -2009,18 +2009,14 @@
 
 	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 */