gobjectification: 71d3b7f3: Calling purple_blist_node_add_child(grou...
sadrul at pidgin.im
sadrul at pidgin.im
Tue Jul 6 01:57:16 EDT 2010
----------------------------------------------------------------------
Revision: 71d3b7f34561315f66042276a9b97c62893d0580
Parent: aa1c6b5b25ea9d08c5cad53eed96664dd80b6c25
Author: sadrul at pidgin.im
Date: 07/06/10 01:54:38
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/71d3b7f34561315f66042276a9b97c62893d0580
Changelog:
Calling purple_blist_node_add_child(group, buddy) automatically creates a
PurpleContact to maintain the group:contact:buddy hierarchy. So use that
instead of the old purple_blist_add_buddy.
Changes against parent aa1c6b5b25ea9d08c5cad53eed96664dd80b6c25
patched libpurple/protocols/bonjour/buddy.c
patched libpurple/protocols/gg/buddylist.c
patched libpurple/protocols/jabber/roster.c
patched libpurple/protocols/msn/user.c
patched libpurple/protocols/mxit/roster.c
patched libpurple/protocols/myspace/myspace.c
patched libpurple/protocols/novell/novell.c
patched libpurple/protocols/oscar/oscar.c
patched libpurple/protocols/yahoo/libymsg.c
patched libpurple/protocols/zephyr/zephyr.c
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c 291f4baffaf14fed6080809fbfe0dc4f41334f6b
+++ libpurple/protocols/oscar/oscar.c 3d48e750baba3e8a1556b88af815d993cf034d8f
@@ -5344,7 +5344,7 @@ static int purple_ssi_parselist(OscarDat
purple_debug_info("oscar",
"ssi: adding buddy %s to group %s to local list\n", curitem->name, gname);
- purple_blist_add_buddy(b, NULL, g, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
}
if (!oscar_util_name_compare(curitem->name, purple_account_get_username(account))) {
char *comment = aim_ssi_getcomment(od->ssi.local, gname, curitem->name);
@@ -5579,7 +5579,7 @@ purple_ssi_parseaddmod(OscarData *od, Fl
purple_debug_info("oscar",
"ssi: adding buddy %s to group %s to local list\n", name, gname_utf8 ? gname_utf8 : _("Orphans"));
- purple_blist_add_buddy(b, NULL, g, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
/* Mobile users should always be online */
if (name[0] == '+') {
============================================================
--- libpurple/protocols/zephyr/zephyr.c 9eb2ff117e605dcf9bbb7e5f2943e860032e6fc7
+++ libpurple/protocols/zephyr/zephyr.c f8a9412e17cff097970876e08c1f3736b8e604a0
@@ -1516,8 +1516,8 @@ static void process_anyone(PurpleConnect
purple_debug_info("zephyr","stripped_user %s\n",stripped_user);
if (!(b = purple_find_buddy(purple_connection_get_account(gc),stripped_user))){
b = purple_buddy_new(purple_connection_get_account(gc), stripped_user, NULL);
- purple_blist_add_buddy(b, NULL, g, NULL);
- }
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
+ }
g_free(stripped_user);
}
}
============================================================
--- libpurple/protocols/yahoo/libymsg.c 1cc25e5e7ab414f740fa7dae838188b12ac2a495
+++ libpurple/protocols/yahoo/libymsg.c fa7a39b85753182c23e26942b32999c419aa6dda
@@ -429,7 +429,7 @@ static void yahoo_do_group_check(PurpleA
"Uhoh, %s isn't on the list (or not in this group), adding him to group %s.\n", name, group);
g = purple_group_new(group);
b = purple_buddy_new(account, name, NULL);
- purple_blist_add_buddy(b, NULL, g, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
}
if (list) {
@@ -552,7 +552,7 @@ static void yahoo_process_list_15(Purple
if (!(b = purple_find_buddy(account, norm_bud))) {
g = purple_group_new(yd->current_list15_grp);
b = purple_buddy_new(account, norm_bud, NULL);
- purple_blist_add_buddy(b, NULL, g, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
}
yahoo_do_group_check(account, ht, norm_bud, yd->current_list15_grp);
if(fed) {
@@ -708,7 +708,7 @@ static void yahoo_process_list(PurpleCon
if (!(b = purple_find_buddy(account, norm_bud))) {
g = purple_group_new(grp);
b = purple_buddy_new(account, norm_bud, NULL);
- purple_blist_add_buddy(b, NULL, g, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
export = TRUE;
}
============================================================
--- libpurple/protocols/msn/user.c 67219475db569d6969143934d3011fd7b8ee2fe8
+++ libpurple/protocols/msn/user.c 2b6eaff9edb848f075064ba0a69bc699ff6b0d8e
@@ -279,7 +279,7 @@ msn_user_add_group_id(MsnUser *user, con
if (b == NULL)
{
b = purple_buddy_new(account, passport, NULL);
- purple_blist_add_buddy(b, NULL, g, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
}
purple_buddy_set_protocol_data(b, user);
/*Update the blist Node info*/
============================================================
--- libpurple/protocols/jabber/roster.c 817a7b68717664e5b92214df8d284e27eddcd7d9
+++ libpurple/protocols/jabber/roster.c c866f8713e157ec797f3a78815b3de2734ddf8a1
@@ -174,8 +174,7 @@ static void add_purple_buddy_to_groups(J
PurpleGroup *g = purple_group_new(groups->data);
PurpleBuddy *b = purple_buddy_new(account, jid, alias);
- purple_blist_add_buddy(b, NULL, g, NULL);
- purple_buddy_set_alias(b, alias);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), PURPLE_BLIST_NODE(b));
g_free(groups->data);
groups = g_slist_delete_link(groups, groups);
============================================================
--- libpurple/protocols/novell/novell.c a832e3bc9e81767ae11db5acd21b0b8dee23d5ae
+++ libpurple/protocols/novell/novell.c f804b6697c7df6fa72c4f39022941650d429e6de
@@ -376,7 +376,7 @@ _create_contact_resp_cb(NMUser * user, N
buddy = purple_find_buddy_in_group(user->client_data, display_id, group);
if (buddy == NULL) {
buddy = purple_buddy_new(user->client_data, display_id, alias);
- purple_blist_add_buddy(buddy, NULL, group, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(group), PURPLE_BLIST_NODE(buddy));
}
/* Save the new buddy as part of the contact object */
@@ -1316,7 +1316,7 @@ _add_contacts_to_purple_blist(NMUser * u
name,
nm_contact_get_display_name(contact));
- purple_blist_add_buddy(buddy, NULL, group, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(group), PURPLE_BLIST_NODE(buddy));
}
/* Set the initial status for the buddy */
============================================================
--- libpurple/protocols/gg/buddylist.c 8dee97bf69c146c149da3c1792bdd85eb3a08b9d
+++ libpurple/protocols/gg/buddylist.c 8e2ebd50e2b07f93bfbbb562826491ffc4d73792
@@ -139,7 +139,7 @@ void ggp_buddylist_load(PurpleConnection
group = purple_group_new(g);
- purple_blist_add_buddy(buddy, NULL, group, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(group), PURPLE_BLIST_NODE(buddy));
g_free(g);
g_strfreev(data_tbl);
============================================================
--- libpurple/protocols/bonjour/buddy.c 87e6dc4f2e5ff32b434cd6b8c71a4569ed9280af
+++ libpurple/protocols/bonjour/buddy.c ae93e007a7b993634b1a6571998dfa13172c5e80
@@ -150,7 +150,7 @@ bonjour_buddy_add_to_purple(BonjourBuddy
if (buddy == NULL) {
buddy = purple_buddy_new(account, bonjour_buddy->name, NULL);
purple_blist_node_set_flags((PurpleBlistNode *)buddy, PURPLE_BLIST_NODE_FLAG_NO_SAVE);
- purple_blist_add_buddy(buddy, NULL, group, NULL);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(group), PURPLE_BLIST_NODE(buddy));
}
name = purple_buddy_get_name(buddy);
============================================================
--- libpurple/protocols/myspace/myspace.c 7d43cc918e3796b2c1a7e28d71a76161374aac23
+++ libpurple/protocols/myspace/myspace.c 04622e15d9b805730915763217ea97756f8b4418
@@ -1040,7 +1040,7 @@ msim_add_contact_from_server_cb(MsimSess
}
/* TODO: use 'Position' in contact_info to take into account where buddy is */
- purple_blist_add_buddy(buddy, NULL, group, NULL /* insertion point */);
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(group), PURPLE_BLIST_NODE(buddy));
if (strtol(username, NULL, 10) == uid) {
/*
============================================================
--- libpurple/protocols/mxit/roster.c 7f9509242ed837213d479e61ce39e1f284d7e184
+++ libpurple/protocols/mxit/roster.c 9c03d3ab7162301d49ccfbdb6d9a4c1b2e25ad56
@@ -382,7 +382,7 @@ void mxit_update_contact( struct MXitSes
purple_buddy_set_protocol_data(buddy, contact);
/* add new buddy to list */
- purple_blist_add_buddy( buddy, NULL, group, NULL );
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(group), PURPLE_BLIST_NODE(buddy));
}
else {
/* buddy was found in the group */
More information about the Commits
mailing list