gobjectification: 755874db: Fix blist node operations in Pidgin

qulogic at pidgin.im qulogic at pidgin.im
Sun Nov 8 03:31:30 EST 2009


-----------------------------------------------------------------
Revision: 755874db8d1e4b05ced37142deecd321ea02121b
Ancestor: 4eee093a5373096721292f5d51447ca020b3aa5b
Author: qulogic at pidgin.im
Date: 2009-11-08T07:58:19
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/755874db8d1e4b05ced37142deecd321ea02121b

Modified files:
        pidgin/gtklog.c pidgin/plugins/history.c
        pidgin/plugins/ticker/ticker.c

ChangeLog: 

Fix blist node operations in Pidgin

-------------- next part --------------
============================================================
--- pidgin/gtklog.c	ac420f4c99d6c0f1a03c01b9a18d0cc159c4ffad
+++ pidgin/gtklog.c	0fafae5136721de9e1e127c4935c3253d15a165b
@@ -760,9 +760,9 @@ void pidgin_log_show_contact(PurpleConta
 		return;
 	}
 
-	for (child = purple_blist_node_get_first_child((PurpleBlistNode*)contact) ;
+	for (child = purple_blist_node_first_child((PurpleBlistNode*)contact) ;
 	     child != NULL ;
-	     child = purple_blist_node_get_sibling_next(child)) {
+	     child = purple_blist_node_next(child)) {
 		const char *buddy_name;
 		PurpleAccount *account;
 
@@ -787,10 +787,10 @@ void pidgin_log_show_contact(PurpleConta
 		image = NULL;
 	}
 
-	if (contact->alias != NULL)
-		name = contact->alias;
-	else if (contact->priority != NULL)
-		name = purple_buddy_get_contact_alias(contact->priority);
+	if (purple_contact_get_alias(contact) != NULL)
+		name = purple_contact_get_alias(contact);
+	else if (purple_contact_get_priority_buddy(contact) != NULL)
+		name = purple_buddy_get_contact_alias(purple_contact_get_priority_buddy(contact));
 
 	/* This will happen if the contact doesn't have an alias,
 	 * and none of the contact's buddies are online.
============================================================
--- pidgin/plugins/history.c	651d7f4b1f6c8ac7691e335a36e7d7616ddd2916
+++ pidgin/plugins/history.c	f55f165a77584734a7e8751c94b9ea95cc917453
@@ -71,20 +71,20 @@ static void historize(PurpleConversation
 		for (cur = buddies; cur != NULL; cur = cur->next)
 		{
 			PurpleBlistNode *node = cur->data;
-			PurpleBlistNode *prev = purple_blist_node_get_sibling_prev(node);
-			PurpleBlistNode *next = purple_blist_node_get_sibling_next(node);
+			PurpleBlistNode *prev = purple_blist_node_prev(node);
+			PurpleBlistNode *next = purple_blist_node_next(node);
 			if ((node != NULL) && ((prev != NULL) || (next != NULL)))
 			{
 				PurpleBlistNode *node2;
-				PurpleBlistNode *parent = purple_blist_node_get_parent(node);
-				PurpleBlistNode *child = purple_blist_node_get_first_child(parent);
+				PurpleBlistNode *parent = purple_blist_node_parent(node);
+				PurpleBlistNode *child = purple_blist_node_first_child(parent);
 
 				alias = purple_buddy_get_contact_alias((PurpleBuddy *)node);
 
 				/* We've found a buddy that matches this conversation.  It's part of a
 				 * PurpleContact with more than one PurpleBuddy.  Loop through the PurpleBuddies
 				 * in the contact and get all the logs. */
-				for (node2 = child ; node2 != NULL ; node2 = purple_blist_node_get_sibling_next(node2))
+				for (node2 = child ; node2 != NULL ; node2 = purple_blist_node_next(node2))
 				{
 					logs = g_list_concat(purple_log_get_logs(PURPLE_LOG_IM,
 							purple_buddy_get_name((PurpleBuddy *)node2),
============================================================
--- pidgin/plugins/ticker/ticker.c	c257d06dd84be48559f1eaa13915573db5d53a8f
+++ pidgin/plugins/ticker/ticker.c	90668a3dd703782d78de3f48dd4f732784c8033b
@@ -233,19 +233,19 @@ static void buddy_ticker_show(void)
 
 	for(gnode = purple_blist_get_root();
 	    gnode;
-	    gnode = purple_blist_node_get_sibling_next(gnode))
+	    gnode = purple_blist_node_next(gnode))
 	{
 		if(!PURPLE_IS_GROUP(gnode))
 			continue;
-		for(cnode = purple_blist_node_get_first_child(gnode);
+		for(cnode = purple_blist_node_first_child(gnode);
 		    cnode;
-		    cnode = purple_blist_node_get_sibling_next(cnode))
+		    cnode = purple_blist_node_next(cnode))
 		{
 			if(!PURPLE_IS_CONTACT(cnode))
 				continue;
-			for(bnode = purple_blist_node_get_first_child(cnode);
+			for(bnode = purple_blist_node_first_child(cnode);
 			    bnode;
-			    bnode = purple_blist_node_get_sibling_next(bnode))
+			    bnode = purple_blist_node_next(bnode))
 			{
 				if(!PURPLE_IS_BUDDY(bnode))
 					continue;


More information about the Commits mailing list