pidgin.next.minor: 48459d41: Struct hiding for Finch. PurpleChat:alia...

sadrul at pidgin.im sadrul at pidgin.im
Sat Nov 1 09:50:28 EDT 2008


-----------------------------------------------------------------
Revision: 48459d414ca1ecedc43f0340b6bf2c645f488d7d
Ancestor: cee90a384bbe720ad5a9b7a04677c31554ae7192
Author: sadrul at pidgin.im
Date: 2008-11-01T13:48:25
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/48459d414ca1ecedc43f0340b6bf2c645f488d7d

Modified files:
        finch/gntblist.c finch/gntconv.c finch/gntlog.c

ChangeLog: 

Struct hiding for Finch. PurpleChat:alias and PurpleContact:totalsize are still used.

-------------- next part --------------
============================================================
--- finch/gntblist.c	baec9ac0b96ecbd26b5018481cc6cb5d2792acb8
+++ finch/gntblist.c	474c9e16b411dc8252e8ded5382fdf2ba9ecab2e
@@ -1438,16 +1438,16 @@ static void showlog_cb(PurpleBlistNode *
 	if (PURPLE_BLIST_NODE_IS_BUDDY(node)) {
 		PurpleBuddy *b = (PurpleBuddy*) node;
 		type = PURPLE_LOG_IM;
-		name = g_strdup(b->name);
-		account = b->account;
+		name = g_strdup(purple_buddy_get_name(b));
+		account = purple_buddy_get_account(b);
 	} else if (PURPLE_BLIST_NODE_IS_CHAT(node)) {
 		PurpleChat *c = (PurpleChat*) node;
 		PurplePluginProtocolInfo *prpl_info = NULL;
 		type = PURPLE_LOG_CHAT;
-		account = c->account;
+		account = purple_chat_get_account(c);
 		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_find_prpl(purple_account_get_protocol_id(account)));
 		if (prpl_info && prpl_info->get_chat_name) {
-			name = prpl_info->get_chat_name(c->components);
+			name = prpl_info->get_chat_name(purple_chat_get_components(c));
 		}
 	} else if (PURPLE_BLIST_NODE_IS_CONTACT(node)) {
 		finch_log_show_contact((PurpleContact *)node);
============================================================
--- finch/gntconv.c	310e23a5175767c7796e9896ee1c685ce8b78c04
+++ finch/gntconv.c	432ae251b6e9b10f9068b072283351bc0542ae8a
@@ -496,8 +496,9 @@ view_log_cb(GntMenuItem *n, gpointer ggc
 	buddies = purple_find_buddies(account, name);
 	for (cur = buddies; cur != NULL; cur = cur->next) {
 		PurpleBlistNode *node = cur->data;
-		if ((node != NULL) && ((node->prev != NULL) || (node->next != NULL))) {
-			finch_log_show_contact((PurpleContact *)node->parent);
+		if ((node != NULL) &&
+				(purple_blist_node_get_sibling_prev(node) || purple_blist_node_get_sibling_next(node))) {
+			finch_log_show_contact((PurpleContact *)purple_blist_node_get_parent(node));
 			g_slist_free(buddies);
 			return;
 		}
============================================================
--- finch/gntlog.c	42ac4af19deac2a04722299f5e6c82e10cfed445
+++ finch/gntlog.c	991975dfaa8d0bf28aa2064139bd24152ebcaca7
@@ -458,12 +458,16 @@ void finch_log_show_contact(PurpleContac
 
 	for (child = purple_blist_node_get_first_child((PurpleBlistNode*)contact); child;
 			child = purple_blist_node_get_sibling_next(child)) {
+		const char *name;
+		PurpleAccount *account;
 		if (!PURPLE_BLIST_NODE_IS_BUDDY(child))
 			continue;
 
-		logs = g_list_concat(purple_log_get_logs(PURPLE_LOG_IM, ((PurpleBuddy *)child)->name,
-						((PurpleBuddy *)child)->account), logs);
-		total_log_size += purple_log_get_total_size(PURPLE_LOG_IM, ((PurpleBuddy *)child)->name, ((PurpleBuddy *)child)->account);
+		name = purple_buddy_get_name((PurpleBuddy *)child);
+		account = purple_buddy_get_account((PurpleBuddy *)child);
+		logs = g_list_concat(purple_log_get_logs(PURPLE_LOG_IM, name,
+						account), logs);
+		total_log_size += purple_log_get_total_size(PURPLE_LOG_IM, name, account);
 	}
 	logs = g_list_sort(logs, purple_log_compare);
 


More information about the Commits mailing list