pidgin.next.minor: 98fe5e59: updated the pidgin plugins for the blist...

grim at pidgin.im grim at pidgin.im
Sun Nov 2 06:10:30 EST 2008


-----------------------------------------------------------------
Revision: 98fe5e59d5266adcb10b8c01fe28b5f4a6eb3f67
Ancestor: 6ec5643ea955e0709872ab2089e96a675f194b80
Author: grim at pidgin.im
Date: 2008-11-02T11:08:08
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/98fe5e59d5266adcb10b8c01fe28b5f4a6eb3f67

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

ChangeLog: 

updated the pidgin plugins for the blist struct hiding


-------------- next part --------------
============================================================
--- pidgin/plugins/history.c	19453cd81a045001ad1f00d5235f4bd80d3f1da2
+++ pidgin/plugins/history.c	512f942f48c917a4abb62252e5d4996b88839b18
@@ -70,16 +70,20 @@ static void historize(PurpleConversation
 	        for (cur = buddies; cur != NULL; cur = cur->next)
 	        {
 	                PurpleBlistNode *node = cur->data;
-	                if ((node != NULL) && ((node->prev != NULL) || (node->next != NULL)))
+					PurpleBlistNode *prev = purple_blist_node_get_sibling_prev(node);
+					PurpleBlistNode *next = purple_blist_node_get_sibling_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);
 
 				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 = node->parent->child ; node2 != NULL ; node2 = node2->next)
+				for (node2 = child ; node2 != NULL ; node2 = purple_blist_node_get_sibling_next(node2))
 				{
 					logs = g_list_concat(
 						purple_log_get_logs(PURPLE_LOG_IM,
============================================================
--- pidgin/plugins/ticker/ticker.c	1195ddee375ef7f44ec0ec1875882c4e24870e30
+++ pidgin/plugins/ticker/ticker.c	6de0a400664ed126d35e1a46bca739a5f9a7316d
@@ -91,7 +91,9 @@ static gboolean buddy_click_cb(GtkWidget
 	PurpleContact *contact = user_data;
 	PurpleBuddy *b = purple_contact_get_priority_buddy(contact);
 
-	purple_conversation_new(PURPLE_CONV_TYPE_IM, b->account, b->name);
+	purple_conversation_new(PURPLE_CONV_TYPE_IM,
+	                        purple_buddy_get_account(b),
+							purple_buddy_get_name(b));
 	return TRUE;
 }
 
@@ -217,20 +219,25 @@ static void buddy_ticker_show(void)
 
 static void buddy_ticker_show(void)
 {
-	PurpleBuddyList *list = purple_get_blist();
 	PurpleBlistNode *gnode, *cnode, *bnode;
 	PurpleBuddy *b;
 
-	if(!list)
-		return;
-
-	for(gnode = list->root; gnode; gnode = gnode->next) {
+	for(gnode = purple_blist_get_root();
+	    gnode;
+	    gnode = purple_blist_node_get_sibling_next(gnode))
+	{
 		if(!PURPLE_BLIST_NODE_IS_GROUP(gnode))
 			continue;
-		for(cnode = gnode->child; cnode; cnode = cnode->next) {
+		for(cnode = purple_blist_node_get_first_child(gnode);
+		    cnode;
+		    cnode = purple_blist_node_get_sibling_next(cnode))
+		{
 			if(!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
 				continue;
-			for(bnode = cnode->child; bnode; bnode = bnode->next) {
+			for(bnode = purple_blist_node_get_first_child(cnode);
+			    bnode;
+			    bnode = purple_blist_node_get_sibling_next(bnode))
+			{
 				if(!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
 					continue;
 				b = (PurpleBuddy *)bnode;


More information about the Commits mailing list