gobjectification: 34d42527: Compile qq and simple prpls.

sadrul at pidgin.im sadrul at pidgin.im
Tue Jul 6 22:01:07 EDT 2010


----------------------------------------------------------------------
Revision: 34d42527d618c9d019e6bb22745fd8ec90b4df20
Parent:   cc3ad36903ab8eb38b1205f1818fd0697949a934
Author:   sadrul at pidgin.im
Date:     07/06/10 21:59:34
Branch:   im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/34d42527d618c9d019e6bb22745fd8ec90b4df20

Changelog: 

Compile qq and simple prpls.

Changes against parent cc3ad36903ab8eb38b1205f1818fd0697949a934

  patched  libpurple/protocols/qq/buddy_opt.c
  patched  libpurple/protocols/simple/simple.c

-------------- next part --------------
============================================================
--- libpurple/protocols/simple/simple.c	d357d97139e764a403e99fd2d540872385d528bf
+++ libpurple/protocols/simple/simple.c	05c6ea94510433560636ce3d3ba4c37f6c27ca11
@@ -888,15 +888,11 @@ static gboolean simple_add_lcs_contacts(
 		if ((group = xmlnode_get_child(isc, "group"))) {
 			name_group = xmlnode_get_attrib(group, "name");
 			purple_debug_info("simple", "name_group->%s\n", name_group);
-			g = purple_find_group(name_group);
-			if(!g)
-				g = purple_group_new(name_group);
+			g = purple_group_new(name_group);
 		}
 
 		if (!g) {
-			g = purple_find_group("Buddies");
-			if(!g)
-				g = purple_group_new("Buddies");
+			g = purple_group_new("Buddies");
 		}
 
 		for(item = xmlnode_get_child(isc, "contact"); item; item = xmlnode_get_next_twin(item))
@@ -912,11 +908,10 @@ static gboolean simple_add_lcs_contacts(
 
 			b = purple_find_buddy(sip->account, buddy_name);
 			if(!b){
-				b = purple_buddy_new(sip->account, buddy_name, uri);
+				b = purple_buddy_new(sip->account, buddy_name, uri, PURPLE_BLIST_NODE(g));
 			}
 			g_free(buddy_name);
 
-			purple_blist_add_buddy(b, NULL, g, NULL);
 			purple_buddy_set_alias(b, uri);
 			bs = g_new0(struct simple_buddy, 1);
 			bs->name = g_strdup(purple_buddy_get_name(b));
============================================================
--- libpurple/protocols/qq/buddy_opt.c	f3ca734921d690f0f3a058c4faf0951f14de07e4
+++ libpurple/protocols/qq/buddy_opt.c	75bf0cf2a95da9e1cc8be4e6717fbd82d09a76e3
@@ -78,12 +78,7 @@ PurpleGroup *qq_group_find_or_new(const 
 
 	g_return_val_if_fail(group_name != NULL, NULL);
 
-	g = purple_find_group(group_name);
-	if (g == NULL) {
-		g = purple_group_new(group_name);
-		purple_blist_node_add_child(PURPLE_BLIST_NODE(g), purple_blist_get_root());
-		purple_debug_warning("QQ", "Add new group: %s\n", group_name);
-	}
+	g = purple_group_new(group_name);
 
 	return g;
 }
@@ -152,13 +147,11 @@ PurpleBuddy *qq_buddy_new(PurpleConnecti
 
 	purple_debug_info("QQ", "Add new purple buddy: [%u]\n", uid);
 	who = uid_to_purple_name(uid);
-	buddy = purple_buddy_new(account, who, NULL);	/* alias is NULL */
+	buddy = purple_buddy_new(account, who, NULL, PURPLE_BLIST_NODE(group));	/* alias is NULL */
 	purple_object_set_protocol_data(PURPLE_OBJECT(buddy), NULL);
 
 	g_free(who);
 
-	purple_blist_add_buddy(buddy, NULL, group, NULL);
-
 	g_free(group_name);
 
 	return buddy;


More information about the Commits mailing list