gobjectification: 5388c563: Yay, Pidgin compiles!

qulogic at pidgin.im qulogic at pidgin.im
Thu Jun 10 01:31:42 EDT 2010


-----------------------------------------------------------------
Revision: 5388c563498812095f02f8bbee6b848f1b2161f0
Ancestor: 8803175ce90325a6bcb5dfe7f03373b3a5f19bfe
Author: qulogic at pidgin.im
Date: 2010-06-10T03:53:32
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/5388c563498812095f02f8bbee6b848f1b2161f0

Modified files:
        pidgin/gtkblist.c pidgin/gtkconv.c pidgin/gtkdialogs.c

ChangeLog: 

Yay, Pidgin compiles!

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	8ae72819ca6e194808ebe08d94f040813b83bdf9
+++ pidgin/gtkblist.c	bee3456597afda16a1e1d9b66fd82a91f529ae1d
@@ -31,6 +31,7 @@
 #include "connection.h"
 #include "core.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "notify.h"
 #include "prpl.h"
 #include "prefs.h"
@@ -185,7 +186,7 @@ static gboolean gtk_blist_visibility_cb(
 		old_state != GDK_VISIBILITY_FULLY_OBSCURED) {
 
 		/* no longer fully obscured */
-		pidgin_blist_refresh_timer(purple_get_blist());
+		pidgin_blist_refresh_timer();
 	}
 
 	/* continue to handle event normally */
@@ -199,7 +200,7 @@ static gboolean gtk_blist_window_state_c
 			purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/list_visible", FALSE);
 		else {
 			purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/blist/list_visible", TRUE);
-			pidgin_blist_refresh_timer(purple_get_blist());
+			pidgin_blist_refresh_timer();
 		}
 	}
 
@@ -213,7 +214,7 @@ static gboolean gtk_blist_window_state_c
 	/* Refresh gtkblist if un-iconifying */
 	if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED){
 		if (!(event->new_window_state & GDK_WINDOW_STATE_ICONIFIED))
-			pidgin_blist_refresh_timer(purple_get_blist());
+			pidgin_blist_refresh_timer();
 	}
 
 	return FALSE;
@@ -336,7 +337,7 @@ static void gtk_blist_menu_move_to_cb(Gt
 static void gtk_blist_menu_move_to_cb(GtkWidget *w, PurpleBlistNode *node)
 {
 	PurpleGroup *group = g_object_get_data(G_OBJECT(w), "groupnode");
-	purple_blist_add_contact((PurpleContact *)node, group, NULL);
+	purple_blist_node_add_child(node, PURPLE_BLIST_NODE(group));
 
 }
 
@@ -404,11 +405,11 @@ static void gtk_blist_menu_join_cb(GtkWi
 	gtk_blist_join_chat(chat);
 }
 
-static void gtk_blist_renderer_editing_cancelled_cb(GtkCellRenderer *renderer, PurpleBuddyList *list)
+static void gtk_blist_renderer_editing_cancelled_cb(GtkCellRenderer *renderer, gpointer user_data)
 {
 	editing_blist = FALSE;
 	g_object_set(G_OBJECT(renderer), "editable", FALSE, NULL);
-	pidgin_blist_refresh(list);
+	pidgin_blist_refresh();
 }
 
 static void gtk_blist_renderer_editing_started_cb(GtkCellRenderer *renderer,
@@ -435,7 +436,7 @@ static void gtk_blist_renderer_editing_s
 		text = purple_buddy_get_alias(PURPLE_BUDDY(node));
 	} else if (PURPLE_IS_GROUP(node)) {
 		text = purple_group_get_name(PURPLE_GROUP(node));
-	} else if {PURPLE_IS_CHAT(node)) {
+	} else if (PURPLE_IS_CHAT(node)) {
 		text = purple_chat_get_name(PURPLE_CHAT(node));
 	} else {
 		g_return_if_reached();
@@ -465,14 +466,14 @@ gtk_blist_do_personize(GList *merges)
 		int i = 0;
 
 		if(PURPLE_IS_BUDDY(node))
-			node = purple_blist_node_get_parent(node);
+			node = purple_blist_node_parent(node);
 
 		if(!PURPLE_IS_CONTACT(node))
 			continue;
 
-		for (b = purple_blist_node_get_first_child(node);
+		for (b = purple_blist_node_first_child(node);
 		     b;
-		     b = purple_blist_node_get_sibling_next(b))
+		     b = purple_blist_node_next(b))
 		{
 			i++;
 		}
@@ -490,7 +491,7 @@ gtk_blist_do_personize(GList *merges)
 	for (tmp = merges; tmp; tmp = tmp->next) {
 		PurpleBlistNode *node = tmp->data;
 		if (PURPLE_IS_BUDDY(node))
-			node = purple_blist_node_get_parent(node);
+			node = purple_blist_node_parent(node);
 
 		if (node == contact)
 			continue;
@@ -512,9 +513,9 @@ gtk_blist_auto_personize(PurpleBlistNode
 	int i = 0;
 	char *a = g_utf8_casefold(alias, -1);
 
-	for (contact = purple_blist_node_get_first_child(group);
+	for (contact = purple_blist_node_first_child(group);
 	     contact != NULL;
-	     contact = purple_blist_node_get_sibling_next(contact)) {
+	     contact = purple_blist_node_next(contact)) {
 		char *node_alias;
 		if (!PURPLE_IS_CONTACT(contact))
 			continue;
@@ -528,9 +529,9 @@ gtk_blist_auto_personize(PurpleBlistNode
 		}
 		g_free(node_alias);
 
-		for (buddy = purple_blist_node_get_first_child(contact);
+		for (buddy = purple_blist_node_first_child(contact);
 		     buddy;
-		     buddy = purple_blist_node_get_sibling_next(buddy))
+		     buddy = purple_blist_node_next(buddy))
 		{
 			if (!PURPLE_IS_BUDDY(buddy))
 				continue;
@@ -559,7 +560,7 @@ static void gtk_blist_renderer_edited_cb
 }
 
 static void gtk_blist_renderer_edited_cb(GtkCellRendererText *text_rend, char *arg1,
-					 char *arg2, PurpleBuddyList *list)
+					 char *arg2, gpointer user_data)
 {
 	GtkTreeIter iter;
 	GtkTreePath *path;
@@ -592,12 +593,12 @@ static void gtk_blist_renderer_edited_cb
 		 */
 		if (purple_contact_get_alias(contact) || gtknode->contact_expanded) {
 			purple_blist_alias_contact(contact, arg2);
-			gtk_blist_auto_personize(purple_blist_node_get_parent(node), arg2);
+			gtk_blist_auto_personize(purple_blist_node_parent(node), arg2);
 		} else {
 			PurpleBuddy *buddy = purple_contact_get_priority_buddy(contact);
 			purple_buddy_set_alias(buddy, arg2);
 			serv_alias_buddy(buddy);
-			gtk_blist_auto_personize(purple_blist_node_get_parent(node), arg2);
+			gtk_blist_auto_personize(purple_blist_node_parent(node), arg2);
 		}
 	} else if(PURPLE_IS_BUDDY(node)){
 		PurpleGroup *group = purple_buddy_get_group(PURPLE_BUDDY(node));
@@ -615,7 +616,7 @@ static void gtk_blist_renderer_edited_cb
 	} else if(PURPLE_IS_CHAT(node)) {
 		purple_chat_set_alias(PURPLE_CHAT(node), arg2);
 	}
-	pidgin_blist_refresh(list);
+	pidgin_blist_refresh();
 }
 
 static void
@@ -697,7 +698,7 @@ static void gtk_blist_menu_alias_cb(GtkW
 
 	if (!(get_iter_from_node(node, &iter))) {
 		/* This is either a bug, or the buddy is in a collapsed contact */
-		node = purple_blist_node_get_parent(node);
+		node = purple_blist_node_parent(node);
 		if (!get_iter_from_node(node, &iter))
 			/* Now it's definitely a bug */
 			return;
@@ -768,7 +769,7 @@ static void gtk_blist_menu_showoffline_c
 	{
 		purple_blist_node_set_bool(node, "show_offline",
 		                           !purple_blist_node_get_bool(node, "show_offline"));
-		pidgin_blist_update(purple_get_blist(), node);
+		pidgin_blist_update(node);
 	}
 	else if (PURPLE_IS_CONTACT(node))
 	{
@@ -776,29 +777,29 @@ static void gtk_blist_menu_showoffline_c
 		gboolean setting = !purple_blist_node_get_bool(node, "show_offline");
 
 		purple_blist_node_set_bool(node, "show_offline", setting);
-		for (bnode = purple_blist_node_get_first_child(node);
+		for (bnode = purple_blist_node_first_child(node);
 		     bnode != NULL;
-		     bnode = purple_blist_node_get_sibling_next(bnode))
+		     bnode = purple_blist_node_next(bnode))
 		{
 			purple_blist_node_set_bool(bnode, "show_offline", setting);
-			pidgin_blist_update(purple_get_blist(), bnode);
+			pidgin_blist_update(bnode);
 		}
 	} else if (PURPLE_IS_GROUP(node)) {
 		PurpleBlistNode *cnode, *bnode;
 		gboolean setting = !purple_blist_node_get_bool(node, "show_offline");
 
 		purple_blist_node_set_bool(node, "show_offline", setting);
-		for (cnode = purple_blist_node_get_first_child(node);
+		for (cnode = purple_blist_node_first_child(node);
 		     cnode != NULL;
-		     cnode = purple_blist_node_get_sibling_next(cnode))
+		     cnode = purple_blist_node_next(cnode))
 		{
 			purple_blist_node_set_bool(cnode, "show_offline", setting);
-			for (bnode = purple_blist_node_get_first_child(cnode);
+			for (bnode = purple_blist_node_first_child(cnode);
 			     bnode != NULL;
-			     bnode = purple_blist_node_get_sibling_next(bnode))
+			     bnode = purple_blist_node_next(bnode))
 			{
 				purple_blist_node_set_bool(bnode, "show_offline", setting);
-				pidgin_blist_update(purple_get_blist(), bnode);
+				pidgin_blist_update(bnode);
 			}
 		}
 	}
@@ -843,7 +844,7 @@ do_join_chat(PidginChatData *data)
 
 		chat = purple_chat_new(data->rq_data.account, NULL, components);
 		gtk_blist_join_chat(chat);
-		purple_blist_remove_chat(chat);
+		purple_blist_node_remove(PURPLE_BLIST_NODE(chat));
 	}
 }
 
@@ -911,7 +912,7 @@ pidgin_blist_update_privacy_cb(PurpleBud
 	struct _pidgin_blist_node *ui_data = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(buddy));
 	if (ui_data == NULL || ui_data->row == NULL)
 		return;
-	pidgin_blist_update_buddy(purple_get_blist(), PURPLE_BLIST_NODE(buddy), TRUE);
+	pidgin_blist_update_buddy(PURPLE_BLIST_NODE(buddy), TRUE);
 }
 
 static gboolean
@@ -1186,13 +1187,13 @@ static void gtk_blist_row_collapsed_cb(G
 
 		purple_blist_node_set_bool(node, "collapsed", TRUE);
 
-		for(cnode = purple_blist_node_get_first_child(node); cnode; cnode = purple_blist_node_get_sibling_next(cnode)) {
+		for(cnode = purple_blist_node_first_child(node); cnode; cnode = purple_blist_node_next(cnode)) {
 			if (PURPLE_IS_CONTACT(cnode)) {
 				gtknode = purple_blist_node_get_ui_data(cnode);
 				if (!gtknode->contact_expanded)
 					continue;
 				gtknode->contact_expanded = FALSE;
-				pidgin_blist_update_contact(NULL, cnode);
+				pidgin_blist_update_contact(cnode);
 			}
 		}
 		pidgin_blist_tooltip_destroy();
@@ -1262,7 +1263,7 @@ static void pidgin_blist_add_buddy_cb(vo
 		if (PURPLE_IS_BUDDY(node)) {
 			PurpleGroup *group = purple_buddy_get_group(PURPLE_BUDDY(node));
 			purple_blist_request_add_buddy(NULL, NULL, purple_group_get_name(group), NULL);
-		} else if (PURPLE_IS_CONTACT(node) || PURPLE_BLIST_NODE_IS_CHAT(node)) {
+		} else if (PURPLE_IS_CONTACT(node) || PURPLE_IS_CHAT(node)) {
 			PurpleGroup *group = purple_contact_get_group(PURPLE_CONTACT(node));
 			purple_blist_request_add_buddy(NULL, NULL, purple_group_get_name(group), NULL);
 		} else if (PURPLE_IS_GROUP(node)) {
@@ -1299,7 +1300,7 @@ scroll_to_expanded_cell(gpointer data)
 {
 	struct _expand *ex = data;
 	gtk_tree_view_scroll_to_cell(ex->treeview, ex->path, NULL, FALSE, 0, 0);
-	pidgin_blist_update_contact(NULL, ex->node);
+	pidgin_blist_update_contact(ex->node);
 
 	gtk_tree_path_free(ex->path);
 	g_free(ex);
@@ -1322,8 +1323,8 @@ pidgin_blist_expand_contact_cb(GtkWidget
 
 	gtknode->contact_expanded = TRUE;
 
-	for(bnode = purple_blist_node_get_first_child(node); bnode; bnode = purple_blist_node_get_sibling_next(bnode)) {
-		pidgin_blist_update(NULL, bnode);
+	for(bnode = purple_blist_node_first_child(node); bnode; bnode = purple_blist_node_next(bnode)) {
+		pidgin_blist_update(bnode);
 	}
 
 	/* This ensures that the bottom buddy is visible, i.e. not scrolled off the alignment */
@@ -1337,7 +1338,7 @@ pidgin_blist_expand_contact_cb(GtkWidget
 		/* Let the treeview draw so it knows where to scroll */
 		ex->treeview = GTK_TREE_VIEW(gtkblist->treeview);
 		ex->path = path;
-		ex->node = purple_blist_node_get_first_child(node);
+		ex->node = purple_blist_node_first_child(node);
 		g_idle_add(scroll_to_expanded_cell, ex);
 	}
 }
@@ -1355,8 +1356,8 @@ pidgin_blist_collapse_contact_cb(GtkWidg
 
 	gtknode->contact_expanded = FALSE;
 
-	for(bnode = purple_blist_node_get_first_child(node); bnode; bnode = purple_blist_node_get_sibling_next(bnode)) {
-		pidgin_blist_update(NULL, bnode);
+	for(bnode = purple_blist_node_first_child(node); bnode; bnode = purple_blist_node_next(bnode)) {
+		pidgin_blist_update(bnode);
 	}
 }
 
@@ -1384,7 +1385,7 @@ toggle_privacy(GtkWidget *widget, Purple
 	else
 		purple_privacy_allow(account, name, FALSE, FALSE);
 
-	pidgin_blist_update(purple_get_blist(), node);
+	pidgin_blist_update(node);
 }
 
 void pidgin_append_blist_node_privacy_menu(GtkWidget *menu, PurpleBlistNode *node)
@@ -1446,10 +1447,10 @@ pidgin_append_blist_node_move_to_menu(Gt
 	submenu = gtk_menu_new();
 	gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu);
 
-	for (group = purple_blist_get_root(); group; group = purple_blist_node_get_sibling_next(group)) {
+	for (group = purple_blist_get_root(); group; group = purple_blist_node_next(group)) {
 		if (!PURPLE_IS_GROUP(group))
 			continue;
-		if (group == purple_blist_node_get_parent(node))
+		if (group == purple_blist_node_parent(node))
 			continue;
 		menuitem = pidgin_new_item_from_stock(submenu, purple_group_get_name((PurpleGroup *)group), NULL,
 						      G_CALLBACK(gtk_blist_menu_move_to_cb), node, 0, 0, NULL);
@@ -1753,7 +1754,7 @@ create_chat_menu(PurpleBlistNode *node, 
 	pidgin_new_item_from_stock(menu, _("View _Log"), NULL,
 			G_CALLBACK(gtk_blist_menu_showlog_cb), node, 0, 0, NULL);
 
-	pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(c->account), node);
+	pidgin_append_blist_node_proto_menu(menu, purple_account_get_connection(purple_chat_get_account(c)), node);
 	pidgin_append_blist_node_extended_menu(menu, node);
 
 	pidgin_separator(menu);
@@ -2118,7 +2119,7 @@ add_buddies_from_vcard(const char *prpl_
 		for (l = list; l != NULL; l = l->next)
 		{
 			purple_blist_request_add_buddy(account, l->data,
-										 (group ? group->name : NULL),
+										 (group ? purple_group_get_name(group) : NULL),
 										 alias);
 		}
 	}
@@ -2383,17 +2384,17 @@ static void pidgin_blist_drag_data_rcv_c
 					switch(position) {
 						case GTK_TREE_VIEW_DROP_AFTER:
 						case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
-							purple_blist_add_contact(c, (PurpleGroup*)node->parent,
+							purple_blist_node_add_sibling(PURPLE_BLIST_NODE(c),
 									node);
 							break;
 						case GTK_TREE_VIEW_DROP_BEFORE:
 						case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
-							purple_blist_add_contact(c, (PurpleGroup*)node->parent,
+							purple_blist_node_add_sibling(PURPLE_BLIST_NODE(c),
 									node->prev);
 							break;
 					}
 				} else if(PURPLE_IS_GROUP(node)) {
-					purple_blist_add_contact(c, (PurpleGroup*)node, NULL);
+					purple_blist_node_add_child(PURPLE_BLIST_NODE(c), node);
 				} else if(PURPLE_IS_BUDDY(node)) {
 					purple_blist_merge_contact(c, node);
 				}
@@ -2481,18 +2482,18 @@ static void pidgin_blist_drag_data_rcv_c
 					switch (position) {
 					case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
 					case GTK_TREE_VIEW_DROP_AFTER:
-						purple_blist_add_group(g, node);
+						purple_blist_node_add_child(PURPLE_BLIST_NODE(g), node);
 						break;
 					case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
 					case GTK_TREE_VIEW_DROP_BEFORE:
-						purple_blist_add_group(g, node->prev);
+						purple_blist_node_add_child(PURPLE_BLIST_NODE(g), node->prev);
 						break;
 					}
 				} else if(PURPLE_IS_BUDDY(node)) {
-					purple_blist_add_group(g, node->parent->parent);
+					purple_blist_node_add_child(PURPLE_BLIST_NODE(g), node->parent->parent);
 				} else if(PURPLE_IS_CONTACT(node) ||
 						PURPLE_IS_CHAT(node)) {
-					purple_blist_add_group(g, node->parent);
+					purple_blist_node_add_child(PURPLE_BLIST_NODE(g), node->parent);
 				}
 			}
 
@@ -2552,7 +2553,7 @@ static void pidgin_blist_drag_data_rcv_c
 			else
 			{
 				purple_blist_request_add_buddy(account, username,
-											 (group ? group->name : NULL),
+											 (group ? purple_group_get_name(group) : NULL),
 											 alias);
 			}
 		}
@@ -2762,7 +2763,7 @@ static GdkPixbuf *pidgin_blist_get_buddy
 			if (purple_presence_is_idle(presence))
 				idle = TRUE;
 		} else if (group) {
-			if (purple_blist_get_group_online_count(group) == 0)
+			if (purple_group_get_online(group) == 0)
 				offline = TRUE;
 		}
 
@@ -2900,7 +2901,7 @@ static struct tooltip_data * create_tip_
 	if (PURPLE_IS_BUDDY(node)) {
 		account = purple_buddy_get_account(PURPLE_BUDDY(node));
 	} else if (PURPLE_IS_CHAT(node)) {
-		account = ((PurpleChat*)(node))->account;
+		account = purple_chat_get_account(PURPLE_CHAT(node));
 	}
 
 	td->padding = TOOLTIP_BORDER;
@@ -3416,7 +3417,7 @@ edit_mood_cb(PurpleConnection *gc, Purpl
 			const char *text;
 			PurpleAccount *account = purple_connection_get_account(gc);
 
-			if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_SUPPORT_MOOD_MESSAGES) {
+			if (purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAGS_SUPPORT_MOOD_MESSAGES) {
 				PurpleRequestField *text_field;
 				text_field = purple_request_fields_get_field(fields, "text");
 				text = purple_request_field_string_get_value(text_field);
@@ -3704,13 +3705,13 @@ static char *pidgin_get_tooltip_text(Pur
 		PidginBlistNode *bnode = purple_blist_node_get_ui_data(node);
 
 		chat = (PurpleChat *)node;
-		prpl = purple_find_prpl(purple_account_get_protocol_id(chat->account));
+		prpl = purple_find_prpl(purple_account_get_protocol_id(purple_chat_get_account(chat)));
 		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 
 		connections = purple_connections_get_all();
 		if (connections && connections->next)
 		{
-			tmp = g_markup_escape_text(purple_account_get_username(chat->account), -1);
+			tmp = g_markup_escape_text(purple_account_get_username(purple_chat_get_account(chat)), -1);
 			g_string_append_printf(str, _("<b>Account:</b> %s"), tmp);
 			g_free(tmp);
 		}
@@ -3720,12 +3721,12 @@ static char *pidgin_get_tooltip_text(Pur
 		} else {
 			char *chat_name;
 			if (prpl_info && prpl_info->get_chat_name)
-				chat_name = prpl_info->get_chat_name(chat->components);
+				chat_name = prpl_info->get_chat_name(purple_chat_get_components(chat));
 			else
 				chat_name = g_strdup(purple_chat_get_name(chat));
 
 			conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, chat_name,
-					chat->account);
+					purple_chat_get_account(chat));
 			g_free(chat_name);
 		}
 
@@ -3742,7 +3743,7 @@ static char *pidgin_get_tooltip_text(Pur
 		}
 
 		if (prpl_info && prpl_info->chat_info != NULL)
-			cur = prpl_info->chat_info(purple_account_get_connection(chat->account));
+			cur = prpl_info->chat_info(purple_account_get_connection(purple_chat_get_account(chat)));
 		else
 			cur = NULL;
 
@@ -3751,13 +3752,13 @@ static char *pidgin_get_tooltip_text(Pur
 			pce = cur->data;
 
 			if (!pce->secret && (!pce->required &&
-				g_hash_table_lookup(chat->components, pce->identifier) == NULL))
+				g_hash_table_lookup(purple_chat_get_components(chat), pce->identifier) == NULL))
 			{
 				tmp = purple_text_strip_mnemonic(pce->label);
 				name = g_markup_escape_text(tmp, -1);
 				g_free(tmp);
 				value = g_markup_escape_text(g_hash_table_lookup(
-										chat->components, pce->identifier), -1);
+										purple_chat_get_components(chat), pce->identifier), -1);
 				g_string_append_printf(str, "\n<b>%s</b> %s",
 							name ? name : "",
 							value ? value : "");
@@ -3813,8 +3814,8 @@ static char *pidgin_get_tooltip_text(Pur
 		/* If there's not a contact alias, the node is being displayed with
 		 * this alias, so there's no point in showing it in the tooltip. */
 		if (full && c && purple_buddy_get_alias(b)!= NULL && purple_buddy_get_alias(b)[0] != '\0' &&
-		    (c->alias != NULL && c->alias[0] != '\0') &&
-		    strcmp(c->alias, purple_buddy_get_alias(b)) != 0)
+		    (purple_contact_get_alias(c) != NULL && purple_contact_get_alias(c)[0] != '\0') &&
+		    strcmp(purple_contact_get_alias(c), purple_buddy_get_alias(b)) != 0)
 		{
 			tmp = g_markup_escape_text(purple_buddy_get_alias(b), -1);
 			purple_notify_user_info_add_pair(user_info, _("Buddy Alias"), tmp);
@@ -3934,7 +3935,7 @@ static char *pidgin_get_tooltip_text(Pur
 
 		user_info = purple_notify_user_info_new();
 
-		count = purple_blist_get_group_online_count(group);
+		count = purple_group_get_online(group);
 
 		if (count != 0) {
 			/* Online buddies in group */
@@ -3946,7 +3947,7 @@ static char *pidgin_get_tooltip_text(Pur
 		}
 		count = 0;
 
-		count = purple_blist_get_group_size(group, FALSE);
+		count = purple_group_get_size(group, FALSE);
 		if (count != 0) {
 			/* Total buddies (from online accounts) in group */
 			tmp = g_strdup_printf("%d", count);
@@ -4142,7 +4143,7 @@ pidgin_blist_get_status_icon(PurpleBlist
 		if(buddy)
 			account = purple_buddy_get_account(buddy);
 		else
-			account = chat->account;
+			account = purple_chat_get_account(chat);
 
 		prpl = purple_find_prpl(purple_account_get_protocol_id(account));
 		if(!prpl)
@@ -4263,8 +4264,9 @@ pidgin_blist_get_name_markup(PurpleBuddy
 		gtkcontactnode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(contact));
 
 	/* Name */
-	if (gtkcontactnode && !gtkcontactnode->contact_expanded && contact->alias)
-		name = contact->alias;
+	if (gtkcontactnode && !gtkcontactnode->contact_expanded && purple_contact_get_alias(contact))
+		/* FIXME: I don't think this is the same as contact->alias */
+		name = purple_contact_get_alias(contact);
 	else
 		name = purple_buddy_get_alias(b);
 
@@ -4462,7 +4464,7 @@ static void pidgin_blist_restore_positio
 	}
 }
 
-static gboolean pidgin_blist_refresh_timer(PurpleBuddyList *list)
+static gboolean pidgin_blist_refresh_timer(void)
 {
 	PurpleBlistNode *gnode, *cnode;
 
@@ -4481,7 +4483,7 @@ static gboolean pidgin_blist_refresh_tim
 
 				if (buddy &&
 						purple_presence_is_idle(purple_buddy_get_presence(buddy)))
-					pidgin_blist_update_contact(list, (PurpleBlistNode*)buddy);
+					pidgin_blist_update_contact((PurpleBlistNode*)buddy);
 			}
 		}
 	}
@@ -4490,7 +4492,7 @@ static gboolean pidgin_blist_refresh_tim
 	return TRUE;
 }
 
-static void pidgin_blist_hide_node(PurpleBuddyList *list, PurpleBlistNode *node, gboolean update)
+static void pidgin_blist_hide_node(PurpleBlistNode *node, gboolean update)
 {
 	struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
 	GtkTreeIter iter;
@@ -4504,7 +4506,7 @@ static void pidgin_blist_hide_node(Purpl
 		gtk_tree_store_remove(gtkblist->treemodel, &iter);
 		if(update && (PURPLE_IS_CONTACT(node) ||
 			PURPLE_IS_BUDDY(node) || PURPLE_IS_CHAT(node))) {
-			pidgin_blist_update(list, node->parent);
+			pidgin_blist_update(node->parent);
 		}
 	}
 	gtk_tree_row_reference_free(gtknode->row);
@@ -4561,7 +4563,7 @@ static void
 }
 
 static void
-sign_on_off_cb(PurpleConnection *gc, PurpleBuddyList *blist)
+sign_on_off_cb(PurpleConnection *gc, gpointer data)
 {
 	PidginBuddyList *gtkblist = purple_blist_get_ui_data();
 
@@ -4651,7 +4653,7 @@ conversation_updated_cb(PurpleConversati
 	if(conv->account != NULL && conv->name != NULL) {
 		PurpleBuddy *buddy = purple_find_buddy(conv->account, conv->name);
 		if(buddy != NULL)
-			pidgin_blist_update_buddy(NULL, (PurpleBlistNode *)buddy, TRUE);
+			pidgin_blist_update_buddy((PurpleBlistNode *)buddy, TRUE);
 	}
 
 	if (gtkblist->menutrayicon) {
@@ -4741,7 +4743,7 @@ written_msg_update_ui_cb(PurpleAccount *
 		ui->conv.flags |= PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK;
 
 	ui->conv.last_message = time(NULL);    /* XXX: for lack of better data */
-	pidgin_blist_update(purple_get_blist(), node);
+	pidgin_blist_update(node);
 }
 
 static void
@@ -4752,7 +4754,7 @@ displayed_msg_update_ui_cb(PidginConvers
 		return;
 	ui->conv.flags &= ~(PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE |
 	                    PIDGIN_BLIST_CHAT_HAS_PENDING_MESSAGE_WITH_NICK);
-	pidgin_blist_update(purple_get_blist(), node);
+	pidgin_blist_update(node);
 }
 
 static void
@@ -4809,7 +4811,7 @@ conversation_created_cb(PurpleConversati
  * Public API Functions                                                           *
  **********************************************************************************/
 
-static void pidgin_blist_new_list(PurpleBuddyList *blist)
+static void pidgin_blist_new_list(void)
 {
 	PidginBuddyList *gtkblist;
 
@@ -4884,7 +4886,7 @@ static void _prefs_change_redo_list(cons
 		gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &node, -1);
 	}
 
-	redo_buddy_list(purple_get_blist(), FALSE, FALSE);
+	redo_buddy_list(FALSE, FALSE);
 	gtk_tree_view_columns_autosize(GTK_TREE_VIEW(gtkblist->treeview));
 
 	if (node)
@@ -5510,10 +5512,9 @@ treeview_style_set (GtkWidget *widget,
 		    GtkStyle *prev_style,
 		    gpointer data)
 {
-	PurpleBuddyList *list = data;
 	PurpleBlistNode *node = purple_blist_get_root();
 	while (node) {
-		pidgin_blist_update_group(list, node);
+		pidgin_blist_update_group(node);
 		node = node->next;
 	}
 }
@@ -5610,7 +5611,7 @@ static void
 
 /* builds the blist layout according to to the current theme */
 static void
-pidgin_blist_build_layout(PurpleBuddyList *list)
+pidgin_blist_build_layout(void)
 {
 	GtkTreeViewColumn *column;
 	PidginBlistLayout *layout;
@@ -5673,8 +5674,8 @@ pidgin_blist_build_layout(PurpleBuddyLis
 							    "markup", NAME_COLUMN,
 							    NULL);
 			g_signal_connect(G_OBJECT(rend), "editing-started", G_CALLBACK(gtk_blist_renderer_editing_started_cb), NULL);
-			g_signal_connect(G_OBJECT(rend), "editing-canceled", G_CALLBACK(gtk_blist_renderer_editing_cancelled_cb), list);
-			g_signal_connect(G_OBJECT(rend), "edited", G_CALLBACK(gtk_blist_renderer_edited_cb), list);
+			g_signal_connect(G_OBJECT(rend), "editing-canceled", G_CALLBACK(gtk_blist_renderer_editing_cancelled_cb), NULL);
+			g_signal_connect(G_OBJECT(rend), "edited", G_CALLBACK(gtk_blist_renderer_edited_cb), NULL);
 			g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL);
 			g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
 
@@ -5767,7 +5768,7 @@ pidgin_blist_search_equal_func(GtkTreeMo
 	return res;
 }
 
-static void pidgin_blist_show(PurpleBuddyList *list)
+static void pidgin_blist_show(void)
 {
 	PidginBuddyListPrivate *priv;
 	void *handle;
@@ -5957,7 +5958,7 @@ static void pidgin_blist_show(PurpleBudd
 
 	g_signal_connect(gtkblist->treeview,
 			 "style-set",
-			 G_CALLBACK(treeview_style_set), list);
+			 G_CALLBACK(treeview_style_set), NULL);
 	/* Set up selection stuff */
 	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview));
 	g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(pidgin_blist_selection_changed), NULL);
@@ -5995,7 +5996,7 @@ static void pidgin_blist_show(PurpleBudd
 	/* everything else column */
 	gtkblist->text_column = gtk_tree_view_column_new ();
 	gtk_tree_view_append_column(GTK_TREE_VIEW(gtkblist->treeview), gtkblist->text_column);
-	pidgin_blist_build_layout(list);
+	pidgin_blist_build_layout();
 
 	g_signal_connect(G_OBJECT(gtkblist->treeview), "row-activated", G_CALLBACK(gtk_blist_row_activated_cb), NULL);
 	g_signal_connect(G_OBJECT(gtkblist->treeview), "row-expanded", G_CALLBACK(gtk_blist_row_expanded_cb), NULL);
@@ -6068,14 +6069,14 @@ static void pidgin_blist_show(PurpleBudd
 	pidgin_blist_update_sort_methods();
 
 	/* OK... let's show this bad boy. */
-	pidgin_blist_refresh(list);
+	pidgin_blist_refresh();
 	pidgin_blist_restore_position();
 	gtk_widget_show_all(GTK_WIDGET(gtkblist->vbox));
 	gtk_widget_realize(GTK_WIDGET(gtkblist->window));
 	purple_blist_set_visible(purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/list_visible"));
 
 	/* start the refresh timer */
-	gtkblist->refresh_timer = purple_timeout_add_seconds(30, (GSourceFunc)pidgin_blist_refresh_timer, list);
+	gtkblist->refresh_timer = purple_timeout_add_seconds(30, (GSourceFunc)pidgin_blist_refresh_timer, NULL);
 
 	handle = pidgin_blist_get_handle();
 
@@ -6105,7 +6106,7 @@ static void pidgin_blist_show(PurpleBudd
 
 	handle = purple_accounts_get_handle();
 
-	purple_type_connect(PURPLE_TYPE_ACCOUNT, "enable-changed",
+	purple_g_signal_connect(PURPLE_TYPE_ACCOUNT, "enable-changed",
 			G_CALLBACK(account_modified), gtkblist);
 
 	purple_signal_connect(handle, "account-removed", gtkblist,
@@ -6125,9 +6126,9 @@ static void pidgin_blist_show(PurpleBudd
 
 	handle = NULL;
 	purple_signal_connect(handle, "signed-on", gtkblist,
-	                      PURPLE_CALLBACK(sign_on_off_cb), list);
+	                      PURPLE_CALLBACK(sign_on_off_cb), NULL);
 	purple_signal_connect(handle, "signed-off", gtkblist,
-	                      PURPLE_CALLBACK(sign_on_off_cb), list);
+	                      PURPLE_CALLBACK(sign_on_off_cb), NULL);
 
 	handle = purple_plugins_get_handle();
 	purple_signal_connect(handle, "plugin-load", gtkblist,
@@ -6152,10 +6153,10 @@ static void pidgin_blist_show(PurpleBudd
 
 	/* emit our created signal */
 	handle = pidgin_blist_get_handle();
-	purple_signal_emit(handle, "gtkblist-created", list);
+	purple_signal_emit(handle, "gtkblist-created", NULL);
 }
 
-static void redo_buddy_list(PurpleBuddyList *list, gboolean remove, gboolean rerender)
+static void redo_buddy_list(gboolean remove, gboolean rerender)
 {
 	PurpleBlistNode *node;
 
@@ -6171,34 +6172,32 @@ static void redo_buddy_list(PurpleBuddyL
 		 * status.  We shouldn't need to remove otherwise.
 		 */
 		if (remove && !PURPLE_IS_GROUP(node))
-			pidgin_blist_hide_node(list, node, FALSE);
+			pidgin_blist_hide_node(node, FALSE);
 
 		if (PURPLE_IS_BUDDY(node))
-			pidgin_blist_update_buddy(list, node, rerender);
+			pidgin_blist_update_buddy(node, rerender);
 		else if (PURPLE_IS_CHAT(node))
-			pidgin_blist_update(list, node);
+			pidgin_blist_update(node);
 		else if (PURPLE_IS_GROUP(node))
-			pidgin_blist_update(list, node);
-		node = purple_blist_node_next(node, FALSE);
+			pidgin_blist_update(node);
+		node = purple_blist_node_next_online(node, FALSE);
 	}
 
 }
 
-void pidgin_blist_refresh(PurpleBuddyList *list)
+void pidgin_blist_refresh(void)
 {
-	redo_buddy_list(list, FALSE, TRUE);
+	redo_buddy_list(FALSE, TRUE);
 }
 
 void
-pidgin_blist_update_refresh_timeout()
+pidgin_blist_update_refresh_timeout(void)
 {
-	PurpleBuddyList *blist;
 	PidginBuddyList *gtkblist;
 
-	blist = purple_get_blist();
 	gtkblist = purple_blist_get_ui_data();
 
-	gtkblist->refresh_timer = purple_timeout_add_seconds(30,(GSourceFunc)pidgin_blist_refresh_timer, blist);
+	gtkblist->refresh_timer = purple_timeout_add_seconds(30,(GSourceFunc)pidgin_blist_refresh_timer, NULL);
 }
 
 static gboolean get_iter_from_node(PurpleBlistNode *node, GtkTreeIter *iter) {
@@ -6229,16 +6228,16 @@ static gboolean get_iter_from_node(Purpl
 	return TRUE;
 }
 
-static void pidgin_blist_remove(PurpleBuddyList *list, PurpleBlistNode *node)
+static void pidgin_blist_remove(PurpleBlistNode *node)
 {
 	struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
 
 	purple_request_close_with_handle(node);
 
-	pidgin_blist_hide_node(list, node, TRUE);
+	pidgin_blist_hide_node(node, TRUE);
 
 	if(node->parent)
-		pidgin_blist_update(list, node->parent);
+		pidgin_blist_update(node->parent);
 
 	/* There's something I don't understand here - Ethan */
 	/* Ethan said that back in 2003, but this g_free has been left commented
@@ -6268,9 +6267,9 @@ static gboolean do_selection_changed(Pur
 		old_selection = gtkblist->selected_node;
 		gtkblist->selected_node = new_selection;
 		if(new_selection)
-			pidgin_blist_update(NULL, new_selection);
+			pidgin_blist_update(new_selection);
 		if(old_selection)
-			pidgin_blist_update(NULL, old_selection);
+			pidgin_blist_update(old_selection);
 	}
 
 	return FALSE;
@@ -6297,7 +6296,7 @@ static void pidgin_blist_selection_chang
 	}
 }
 
-static gboolean insert_node(PurpleBuddyList *list, PurpleBlistNode *node, GtkTreeIter *iter)
+static gboolean insert_node(PurpleBlistNode *node, GtkTreeIter *iter)
 {
 	GtkTreeIter parent_iter, cur, *curptr = NULL;
 	struct _pidgin_blist_node *gtknode = purple_blist_node_get_ui_data(node);
@@ -6313,9 +6312,9 @@ static gboolean insert_node(PurpleBuddyL
 		curptr = &cur;
 
 	if(PURPLE_IS_CONTACT(node) || PURPLE_IS_CHAT(node)) {
-		current_sort_method->func(node, list, parent_iter, curptr, iter);
+		current_sort_method->func(node, parent_iter, curptr, iter);
 	} else {
-		sort_method_none(node, list, parent_iter, curptr, iter);
+		sort_method_none(node, parent_iter, curptr, iter);
 	}
 
 	if(gtknode != NULL) {
@@ -6379,8 +6378,7 @@ static gboolean pidgin_blist_group_has_s
 /* This version of pidgin_blist_update_group can take the original buddy or a
  * group, but has much better algorithmic performance with a pre-known buddy.
  */
-static void pidgin_blist_update_group(PurpleBuddyList *list,
-                                      PurpleBlistNode *node)
+static void pidgin_blist_update_group(PurpleBlistNode *node)
 {
 	gint count;
 	PurpleGroup *group;
@@ -6406,9 +6404,9 @@ static void pidgin_blist_update_group(Pu
 	show_offline = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_offline_buddies");
 
 	if(show_offline)
-		count = purple_blist_get_group_size(group, FALSE);
+		count = purple_group_get_size(group, FALSE);
 	else
-		count = purple_blist_get_group_online_count(group);
+		count = purple_group_get_online(group);
 
 	if (count > 0 || purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_empty_groups"))
 		show = TRUE;
@@ -6428,7 +6426,7 @@ static void pidgin_blist_update_group(Pu
 		GdkPixbuf *avatar = NULL;
 		PidginBlistTheme *theme = NULL;
 
-		if(!insert_node(list, gnode, &iter))
+		if(!insert_node(gnode, &iter))
 			return;
 
 		if ((theme = pidgin_blist_get_theme()) == NULL)
@@ -6465,7 +6463,7 @@ static void pidgin_blist_update_group(Pu
 				   -1);
 		g_free(title);
 	} else {
-		pidgin_blist_hide_node(list, gnode, TRUE);
+		pidgin_blist_hide_node(gnode, TRUE);
 	}
 }
 
@@ -6491,8 +6489,8 @@ static char *pidgin_get_group_title(Purp
 
 	if (!expanded) {
 		g_snprintf(group_count, sizeof(group_count), "%d/%d",
-		           purple_blist_get_group_online_count(group),
-		           purple_blist_get_group_size(group, FALSE));
+		           purple_group_get_online(group),
+		           purple_group_get_size(group, FALSE));
 	}
 
 	theme = pidgin_blist_get_theme();
@@ -6507,7 +6505,7 @@ static char *pidgin_get_group_title(Purp
 	text_color = selected ? NULL : theme_font_get_color_default(pair, NULL);
 	text_font = theme_font_get_face_default(pair, "");
 
-	esc = g_markup_escape_text(group->name, -1);
+	esc = g_markup_escape_text(purple_group_get_name(group), -1);
 	if (text_color) {
 		mark = g_strdup_printf("<span foreground='%s' font_desc='%s'><b>%s</b>%s%s%s</span>",
 		                       text_color, text_font,
@@ -6636,7 +6634,7 @@ static void buddy_node(PurpleBuddy *budd
 
 /* This is a variation on the original gtk_blist_update_contact. Here we
 	can know in advance which buddy has changed so we can just update that */
-static void pidgin_blist_update_contact(PurpleBuddyList *list, PurpleBlistNode *node)
+static void pidgin_blist_update_contact(PurpleBlistNode *node)
 {
 	PurpleBlistNode *cnode;
 	PurpleContact *contact;
@@ -6656,9 +6654,9 @@ static void pidgin_blist_update_contact(
 
 	/* First things first, update the group */
 	if (PURPLE_IS_BUDDY(node))
-		pidgin_blist_update_group(list, node);
+		pidgin_blist_update_group(node);
 	else
-		pidgin_blist_update_group(list, cnode->parent);
+		pidgin_blist_update_group(cnode->parent);
 
 	contact = (PurpleContact*)cnode;
 	buddy = purple_contact_get_priority_buddy(contact);
@@ -6667,7 +6665,7 @@ static void pidgin_blist_update_contact(
 	{
 		GtkTreeIter iter;
 
-		if(!insert_node(list, cnode, &iter))
+		if(!insert_node(cnode, &iter))
 			return;
 
 		gtknode = purple_blist_node_get_ui_data(cnode);
@@ -6726,13 +6724,13 @@ static void pidgin_blist_update_contact(
 			buddy_node(buddy, &iter, cnode);
 		}
 	} else {
-		pidgin_blist_hide_node(list, cnode, TRUE);
+		pidgin_blist_hide_node(cnode, TRUE);
 	}
 }
 
 
 
-static void pidgin_blist_update_buddy(PurpleBuddyList *list, PurpleBlistNode *node, gboolean status_change)
+static void pidgin_blist_update_buddy(PurpleBlistNode *node, gboolean status_change)
 {
 	PurpleBuddy *buddy;
 	struct _pidgin_blist_node *gtkparentnode;
@@ -6745,7 +6743,7 @@ static void pidgin_blist_update_buddy(Pu
 	buddy = (PurpleBuddy*)node;
 
 	/* First things first, update the contact */
-	pidgin_blist_update_contact(list, node);
+	pidgin_blist_update_contact(node);
 
 	gtkparentnode = purple_blist_node_get_ui_data(PURPLE_BLIST_NODE(node->parent));
 
@@ -6753,18 +6751,18 @@ static void pidgin_blist_update_buddy(Pu
 	{
 		GtkTreeIter iter;
 
-		if (!insert_node(list, node, &iter))
+		if (!insert_node(node, &iter))
 			return;
 
 		buddy_node(buddy, &iter, node);
 
 	} else {
-		pidgin_blist_hide_node(list, node, TRUE);
+		pidgin_blist_hide_node(node, TRUE);
 	}
 
 }
 
-static void pidgin_blist_update_chat(PurpleBuddyList *list, PurpleBlistNode *node)
+static void pidgin_blist_update_chat(PurpleBlistNode *node)
 {
 	PurpleChat *chat;
 
@@ -6774,11 +6772,11 @@ static void pidgin_blist_update_chat(Pur
 		return;
 
 	/* First things first, update the group */
-	pidgin_blist_update_group(list, node->parent);
+	pidgin_blist_update_group(node->parent);
 
 	chat = (PurpleChat*)node;
 
-	if(purple_account_is_connected(chat->account)) {
+	if(purple_account_is_connected(purple_chat_get_account(chat))) {
 		GtkTreeIter iter;
 		GdkPixbuf *status, *avatar, *emblem, *prpl_icon;
 		const gchar *color, *font;
@@ -6794,7 +6792,7 @@ static void pidgin_blist_update_chat(Pur
 		gboolean selected = (gtkblist->selected_node == node);
 		gboolean nick_said = FALSE;
 
-		if (!insert_node(list, node, &iter))
+		if (!insert_node(node, &iter))
 			return;
 
 		ui = purple_blist_node_get_ui_data(node);
@@ -6842,7 +6840,7 @@ static void pidgin_blist_update_chat(Pur
 		g_free(mark);
 		mark = tmp;
 
-		prpl_icon = pidgin_create_prpl_icon(chat->account, PIDGIN_PRPL_ICON_SMALL);
+		prpl_icon = pidgin_create_prpl_icon(purple_chat_get_account(chat), PIDGIN_PRPL_ICON_SMALL);
 
 		if (theme != NULL)
 			bgcolor = pidgin_blist_theme_get_contact_color(theme);
@@ -6872,14 +6870,13 @@ static void pidgin_blist_update_chat(Pur
 			g_object_unref(prpl_icon);
 
 	} else {
-		pidgin_blist_hide_node(list, node, TRUE);
+		pidgin_blist_hide_node(node, TRUE);
 	}
 }
 
-static void pidgin_blist_update(PurpleBuddyList *list, PurpleBlistNode *node)
+static void pidgin_blist_update(PurpleBlistNode *node)
 {
-	if (list)
-		gtkblist = purple_blist_get_ui_data();
+	gtkblist = purple_blist_get_ui_data();
 	if(!gtkblist || !gtkblist->treeview || !node)
 		return;
 
@@ -6887,26 +6884,23 @@ static void pidgin_blist_update(PurpleBu
 		pidgin_blist_new_node(node);
 
 	if (PURPLE_IS_GROUP(node)){
-		pidgin_blist_update_group(list, node);
+		pidgin_blist_update_group(node);
 	} else if (PURPLE_IS_CONTACT(node)){
-		pidgin_blist_update_contact(list, node);
+		pidgin_blist_update_contact(node);
 	} else if (PURPLE_IS_BUDDY(node)){
-		pidgin_blist_update_buddy(list, node, TRUE);
+		pidgin_blist_update_buddy(node, TRUE);
 	} else if (PURPLE_IS_CHAT(node)){
-		pidgin_blist_update_chat(list, node);
+		pidgin_blist_update_chat(node);
 	}
 
 }
 
-static void pidgin_blist_destroy(PurpleBuddyList *list)
+static void pidgin_blist_destroy(void)
 {
 	PidginBuddyListPrivate *priv;
 
-	if (!list || !list->ui_data)
-		return;
+	g_return_if_fail(purple_blist_get_ui_data() == gtkblist);
 
-	g_return_if_fail(list->ui_data == gtkblist);
-
 	purple_signals_disconnect_by_handle(gtkblist);
 
 	if (gtkblist->headline_close)
@@ -6949,7 +6943,7 @@ static void pidgin_blist_destroy(PurpleB
 	purple_prefs_disconnect_by_handle(pidgin_blist_get_handle());
 }
 
-static void pidgin_blist_set_visible(PurpleBuddyList *list, gboolean show)
+static void pidgin_blist_set_visible(gboolean show)
 {
 	if (!(gtkblist && gtkblist->window))
 		return;
@@ -6995,7 +6989,7 @@ groups_tree(void)
 			if (PURPLE_IS_GROUP(gnode))
 			{
 				g    = (PurpleGroup *)gnode;
-				tmp2 = g->name;
+				tmp2 = purple_group_get_name(g);
 				list  = g_list_append(list, tmp2);
 			}
 		}
@@ -7044,7 +7038,7 @@ add_buddy_cb(GtkWidget *w, int resp, Pid
 			if ((g = purple_find_group(grp)) == NULL)
 			{
 				g = purple_group_new(grp);
-				purple_blist_add_group(g, NULL);
+				purple_blist_node_add_child(PURPLE_BLIST_NODE(g), purple_blist_get_root());
 			}
 
 			b = purple_find_buddy_in_group(account, who, g);
@@ -7196,7 +7190,7 @@ add_chat_cb(GtkWidget *w, PidginAddChatD
 		    ((group = purple_find_group(group_name)) == NULL))
 		{
 			group = purple_group_new(group_name);
-			purple_blist_add_group(group, NULL);
+			purple_blist_node_add_child(PURPLE_BLIST_NODE(group), purple_blist_get_root());
 		}
 
 		purple_blist_add_chat(chat, group, NULL);
@@ -7299,7 +7293,7 @@ pidgin_blist_request_add_chat(PurpleAcco
 	if (name != NULL)
 		gtk_widget_grab_focus(data->alias_entry);
 
-	data->group_combo = pidgin_text_combo_box_entry_new(group ? group->name : NULL, groups_tree());
+	data->group_combo = pidgin_text_combo_box_entry_new(group ? purple_group_get_name(group) : NULL, groups_tree());
 	pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("_Group:"),
 	                          data->chat_data.rq_data.sg, data->group_combo,
 	                          TRUE, NULL);
@@ -7321,7 +7315,7 @@ add_group_cb(PurpleConnection *gc, const
 		return;
 
 	group = purple_group_new(group_name);
-	purple_blist_add_group(group, NULL);
+	purple_blist_node_add_child(PURPLE_BLIST_NODE(group), purple_blist_get_root());
 }
 
 static void
@@ -7456,13 +7450,13 @@ static gboolean autojoin_cb(PurpleConnec
 
 			chat = (PurpleChat *)cnode;
 
-			if(chat->account != account)
+			if(purple_chat_get_account(chat) != account)
 				continue;
 
 			if(purple_blist_node_get_bool((PurpleBlistNode*)chat, "gtk-autojoin") ||
 					(purple_blist_node_get_string((PurpleBlistNode*)chat,
 					 "gtk-autojoin") != NULL))
-				serv_join_chat(gc, chat->components);
+				serv_join_chat(gc, purple_chat_get_components(chat));
 		}
 	}
 
@@ -7484,7 +7478,7 @@ static gboolean buddy_signonoff_timeout_
 	gtknode->recent_signonoff = FALSE;
 	gtknode->recent_signonoff_timer = 0;
 
-	pidgin_blist_update(NULL, (PurpleBlistNode*)buddy);
+	pidgin_blist_update((PurpleBlistNode*)buddy);
 
 	return FALSE;
 }
@@ -7511,7 +7505,6 @@ pidgin_blist_set_theme(PidginBlistTheme 
 pidgin_blist_set_theme(PidginBlistTheme *theme)
 {
 	PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist);
-	PurpleBuddyList *list = purple_get_blist();
 
 	if (theme != NULL)
 		purple_prefs_set_string(PIDGIN_PREFS_ROOT "/blist/theme",
@@ -7524,9 +7517,9 @@ pidgin_blist_set_theme(PidginBlistTheme 
 
 	priv->current_theme = theme ? g_object_ref(theme) : NULL;
 
-	pidgin_blist_build_layout(list);
+	pidgin_blist_build_layout();
 
-	pidgin_blist_refresh(list);
+	pidgin_blist_refresh();
 }
 
 
@@ -7676,9 +7669,9 @@ void pidgin_blist_sort_method_set(const 
 		return;
 	}
 	if (!strcmp(id, "none")) {
-		redo_buddy_list(purple_get_blist(), TRUE, FALSE);
+		redo_buddy_list(TRUE, FALSE);
 	} else {
-		redo_buddy_list(purple_get_blist(), FALSE, FALSE);
+		redo_buddy_list(FALSE, FALSE);
 	}
 }
 
@@ -7686,7 +7679,7 @@ void pidgin_blist_sort_method_set(const 
  ** Sort Methods
  ******************************************/
 
-static void sort_method_none(PurpleBlistNode *node, PurpleBuddyList *blist, GtkTreeIter parent_iter, GtkTreeIter *cur, GtkTreeIter *iter)
+static void sort_method_none(PurpleBlistNode *node, GtkTreeIter parent_iter, GtkTreeIter *cur, GtkTreeIter *iter)
 {
 	PurpleBlistNode *sibling = node->prev;
 	GtkTreeIter sibling_iter;
@@ -7705,7 +7698,7 @@ static void sort_method_none(PurpleBlist
 			sibling ? &sibling_iter : NULL);
 }
 
-static void sort_method_alphabetical(PurpleBlistNode *node, PurpleBuddyList *blist, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter)
+static void sort_method_alphabetical(PurpleBlistNode *node, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter)
 {
 	GtkTreeIter more_z;
 
@@ -7716,7 +7709,7 @@ static void sort_method_alphabetical(Pur
 	} else if(PURPLE_IS_CHAT(node)) {
 		my_name = purple_chat_get_name((PurpleChat*)node);
 	} else {
-		sort_method_none(node, blist, groupiter, cur, iter);
+		sort_method_none(node, groupiter, cur, iter);
 		return;
 	}
 
@@ -7769,7 +7762,7 @@ static void sort_method_alphabetical(Pur
 	}
 }
 
-static void sort_method_status(PurpleBlistNode *node, PurpleBuddyList *blist, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter)
+static void sort_method_status(PurpleBlistNode *node, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter)
 {
 	GtkTreeIter more_z;
 
@@ -7786,7 +7779,7 @@ static void sort_method_status(PurpleBli
 		gtk_tree_store_append(gtkblist->treemodel, iter, &groupiter);
 		return;
 	} else {
-		sort_method_none(node, blist, groupiter, cur, iter);
+		sort_method_none(node, groupiter, cur, iter);
 		return;
 	}
 
@@ -7856,7 +7849,7 @@ static void sort_method_status(PurpleBli
 	}
 }
 
-static void sort_method_log_activity(PurpleBlistNode *node, PurpleBuddyList *blist, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter)
+static void sort_method_log_activity(PurpleBlistNode *node, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter)
 {
 	GtkTreeIter more_z;
 
@@ -7887,7 +7880,7 @@ static void sort_method_log_activity(Pur
 		gtk_tree_store_append(gtkblist->treemodel, iter, &groupiter);
 		return;
 	} else {
-		sort_method_none(node, blist, groupiter, cur, iter);
+		sort_method_none(node, groupiter, cur, iter);
 		return;
 	}
 
@@ -8142,7 +8135,7 @@ pidgin_blist_update_accounts_menu(void)
 		    (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) ||
 			 PURPLE_PLUGIN_HAS_ACTIONS(plugin))) {
 			if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) &&
-			    purple_connection_get_flags(gc) & PURPLE_CONNECTION_SUPPORT_MOODS) {
+			    purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAGS_SUPPORT_MOODS) {
 
 				if (purple_account_get_status(account, "mood")) {
 					menuitem = gtk_menu_item_new_with_mnemonic(_("Set _Mood..."));
============================================================
--- pidgin/gtkconv.c	305f5dd2a86bd7a23fe213b945b29043b93cdd05
+++ pidgin/gtkconv.c	a73da40f4ddc73740796320ae5d73e9692869d36
@@ -3220,7 +3220,7 @@ populate_menu_with_options(GtkWidget *me
 			purple_blist_node_set_flags((PurpleBlistNode *)chat,
 					PURPLE_BLIST_NODE_FLAG_NO_SAVE);
 			g_object_set_data_full(G_OBJECT(gtkconv->imhtml), "transient_chat",
-					chat, (GDestroyNotify)purple_blist_remove_chat);
+					chat, (GDestroyNotify)purple_blist_node_remove);
 		}
 	} else {
 		if (!purple_account_is_connected(conv->account))
@@ -5235,7 +5235,7 @@ pidgin_conv_find_gtkconv(PurpleConversat
 		return NULL;
 
 	cn = PURPLE_BLIST_NODE(c);
-	for (bn = purple_blist_node_get_first_child(cn); bn; bn = purple_blist_node_get_sibling_next(bn)) {
+	for (bn = purple_blist_node_first_child(cn); bn; bn = purple_blist_node_next(bn)) {
 		PurpleBuddy *b = PURPLE_BUDDY(bn);
 		PurpleConversation *conv;
 		if ((conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, purple_buddy_get_name(b), purple_buddy_get_account(b)))) {
============================================================
--- pidgin/gtkdialogs.c	70375ca910d1fc2ca596228a3bda915a4026de2f
+++ pidgin/gtkdialogs.c	3fbe33ae8080dd105992eb69d247a160b2ee6357
@@ -819,7 +819,7 @@ pidgin_dialogs_im(void)
 	purple_request_field_set_required(field, TRUE);
 	purple_request_field_group_add_field(group, field);
 
-	purple_request_fields(purple_get_blist(), _("New Instant Message"),
+	purple_request_fields(purple_blist_get_handle(), _("New Instant Message"),
 						NULL,
 						_("Please enter the username or alias of the person "
 						  "you would like to IM."),
@@ -958,7 +958,7 @@ pidgin_dialogs_info(void)
 	purple_request_field_set_required(field, TRUE);
 	purple_request_field_group_add_field(group, field);
 
-	purple_request_fields(purple_get_blist(), _("Get User Info"),
+	purple_request_fields(purple_blist_get_handle(), _("Get User Info"),
 						NULL,
 						_("Please enter the username or alias of the person "
 						  "whose info you would like to view."),
@@ -1050,7 +1050,7 @@ pidgin_dialogs_log(void)
 	purple_request_field_set_required(field, TRUE);
 	purple_request_field_group_add_field(group, field);
 
-	purple_request_fields(purple_get_blist(), _("View User Log"),
+	purple_request_fields(purple_blist_get_handle(), _("View User Log"),
 						NULL,
 						_("Please enter the username or alias of the person "
 						  "whose log you would like to view."),
@@ -1074,7 +1074,8 @@ pidgin_dialogs_alias_contact(PurpleConta
 
 	purple_request_input(NULL, _("Alias Contact"), NULL,
 					   _("Enter an alias for this contact."),
-					   contact->alias, FALSE, FALSE, NULL,
+					   /* FIXME: Should this be contact->alias? */
+					   purple_contact_get_alias(contact), FALSE, FALSE, NULL,
 					   _("Alias"), G_CALLBACK(pidgin_dialogs_alias_contact_cb),
 					   _("Cancel"), NULL,
 					   NULL, purple_contact_get_alias(contact), NULL,
@@ -1156,6 +1157,7 @@ pidgin_dialogs_remove_contact(PurpleCont
 		pidgin_dialogs_remove_buddy(buddy);
 	} else {
 		gchar *text;
+		int size = purple_contact_get_totalsize(contact) - 1;
 		text = g_strdup_printf(
 					ngettext(
 						"You are about to remove the contact containing %s "
@@ -1163,8 +1165,8 @@ pidgin_dialogs_remove_contact(PurpleCont
 						"want to continue?",
 						"You are about to remove the contact containing %s "
 						"and %d other buddies from your buddy list.  Do you "
-						"want to continue?", contact->totalsize - 1),
-					purple_buddy_get_name(buddy), contact->totalsize - 1);
+						"want to continue?", size),
+					purple_buddy_get_name(buddy), size);
 
 		purple_request_action(contact, NULL, _("Remove Contact"), text, 0,
 				NULL, purple_contact_get_alias(contact), NULL,


More information about the Commits mailing list