gobjectification: 5a2cd843: Fix many incorrect uses of PURPLE_BLIST.
qulogic at pidgin.im
qulogic at pidgin.im
Fri Jul 9 01:12:28 EDT 2010
----------------------------------------------------------------------
Revision: 5a2cd84369c5fa636f11767b153b243514ba2313
Parent: 75ddfcdd64d878458307a9c9f3942fd3dbd72c50
Author: qulogic at pidgin.im
Date: 07/08/10 00:20:08
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/5a2cd84369c5fa636f11767b153b243514ba2313
Changelog:
Fix many incorrect uses of PURPLE_BLIST.
Changes against parent 75ddfcdd64d878458307a9c9f3942fd3dbd72c50
patched libpurple/blist.c
-------------- next part --------------
============================================================
--- libpurple/blist.c aaf40331cbff5b9d825f8acf6c4cf42afd6aa53c
+++ libpurple/blist.c 7fabe8b8e3d1081ff41cc08790e3dc7ef9989255
@@ -247,14 +247,13 @@ blist_to_xmlnode(void)
xmlnode *node, *child, *grandchild;
PurpleBlistNode *gnode;
GList *cur;
- PurpleBuddyList *list = PURPLE_BLIST;
node = xmlnode_new("purple");
xmlnode_set_attrib(node, "version", "1.0");
/* Write groups */
child = xmlnode_new_child(node, "blist");
- gnode = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
+ gnode = purple_blist_get_root();
for (; gnode != NULL; gnode = gnode->next)
{
if (!PURPLE_BLIST_NODE_SHOULD_SAVE(gnode))
@@ -766,7 +765,6 @@ void purple_blist_add_account(PurpleAcco
{
PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
PurpleBlistNode *gnode, *cnode, *bnode;
- PurpleBuddyList *list = PURPLE_BLIST;
PurpleGroup *group;
/* There are long/nasty lines in this function, and it's sibling remove,
@@ -775,7 +773,7 @@ void purple_blist_add_account(PurpleAcco
if (!ops || !ops->update)
return;
- gnode = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
+ gnode = purple_blist_get_root();
for (; gnode; gnode = gnode->next) {
if (!PURPLE_IS_GROUP(gnode))
continue;
@@ -819,9 +817,8 @@ void purple_blist_remove_account(PurpleA
PurpleContact *contact;
PurpleGroup *group;
GList *list = NULL, *iter = NULL;
- PurpleBuddyList *blist = PURPLE_BLIST;
- gnode = purple_blist_node_first_child(PURPLE_BLIST_NODE(blist));
+ gnode = purple_blist_get_root();
for (; gnode; gnode = gnode->next) {
if (!PURPLE_IS_GROUP(gnode))
continue;
@@ -918,7 +915,6 @@ void purple_blist_add_chat(PurpleChat *c
{
PurpleBlistNode *cnode = PURPLE_BLIST_NODE(chat);
PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
- PurpleBuddyList *list = PURPLE_BLIST;
g_return_if_fail(chat != NULL);
g_return_if_fail(PURPLE_IS_CHAT(PURPLE_BLIST_NODE(chat)));
@@ -929,7 +925,7 @@ void purple_blist_add_chat(PurpleChat *c
/* Add group to blist if isn't already on it. Fixes #2752. */
if (!purple_find_group(purple_group_get_name(group))) {
- purple_blist_node_add_child(PURPLE_BLIST_NODE(group), PURPLE_BLIST_NODE(list));
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(group), purple_blist_get_root());
}
} else {
group = PURPLE_GROUP(node->parent);
@@ -1024,7 +1020,7 @@ void purple_blist_add_buddy(PurpleBuddy
g = purple_group_new(_("Buddies"));
/* Add group to blist if isn't already on it. Fixes #2752. */
if (!purple_find_group(purple_group_get_name(g))) {
- purple_blist_node_add_child(PURPLE_BLIST_NODE(g),PURPLE_BLIST_NODE(list));
+ purple_blist_node_add_child(PURPLE_BLIST_NODE(g), purple_blist_get_root());
}
c = purple_contact_new();
purple_blist_node_add_sibling(PURPLE_BLIST_NODE(c),
@@ -1140,7 +1136,6 @@ purple_blist_find_chat(PurpleAccount *ac
PurpleBlistNode *node, *group;
GList *parts;
char *normname;
- PurpleBuddyList *list = PURPLE_BLIST;
g_return_val_if_fail((name != NULL) && (*name != '\0'), NULL);
@@ -1154,7 +1149,7 @@ purple_blist_find_chat(PurpleAccount *ac
return prpl_info->find_blist_chat(account, name);
normname = g_strdup(purple_normalize(account, name));
- group = purple_blist_node_first_child(PURPLE_BLIST_NODE(list));
+ group = purple_blist_get_root();
for (; group != NULL; group = group->next) {
for (node = group->child; node != NULL; node = node->next) {
if (PURPLE_IS_CHAT(node)) {
More information about the Commits
mailing list