changeset 22328:10f9cc2808ec

merge of '7a17d421ad7600c57d0ecdb59f7881de03bf2027' and 'c34575b85d4a4375e63c5bd64126082a708d46f7'
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sun, 24 Feb 2008 01:47:42 +0000
parents 6fc8f0c825e0 (diff) 4345e7aaa7d4 (current diff)
children ee7f81391b45 d4998f31bc1a
files
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/blist.c	Fri Feb 22 17:26:23 2008 +0000
+++ b/libpurple/blist.c	Sun Feb 24 01:47:42 2008 +0000
@@ -1588,7 +1588,7 @@
 					hb->group = gnode;
 					g_hash_table_replace(purplebuddylist->buddies, hb, b);
 
-					if (b->account->gc)
+					if (purple_account_get_connection(b->account))
 						serv_move_buddy(b, (PurpleGroup *)cnode->parent, g);
 				} else {
 					gboolean empty_contact = FALSE;
@@ -1597,7 +1597,7 @@
 					 * gonna delete it instead */
 					g_free(hb->name);
 					g_free(hb);
-					if (b->account->gc)
+					if (purple_account_get_connection(b->account))
 						purple_account_remove_buddy(b->account, b, (PurpleGroup *)cnode->parent);
 
 					if (!cnode->child->next)
@@ -2087,7 +2087,7 @@
 	prpl = purple_find_prpl(purple_account_get_protocol_id(chat->account));
 	prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 
-	parts = prpl_info->chat_info(chat->account->gc);
+	parts = prpl_info->chat_info(purple_account_get_connection(chat->account));
 	pce = parts->data;
 	ret = g_hash_table_lookup(chat->components, pce->identifier);
 	g_list_foreach(parts, (GFunc)g_free, NULL);
--- a/libpurple/conversation.c	Fri Feb 22 17:26:23 2008 +0000
+++ b/libpurple/conversation.c	Sun Feb 24 01:47:42 2008 +0000
@@ -209,11 +209,14 @@
 		const char *message, PurpleMessageFlags flags, time_t when)
 {
 	PurpleConvMessage *msg;
+	PurpleConnection *gc;
+
+	gc = purple_account_get_connection(conv->account);
 
 	if (flags & PURPLE_MESSAGE_SEND) {
 		const char *me = NULL;
-		if (conv->account->gc)
-			me = conv->account->gc->display_name;
+		if (gc)
+			me = purple_connection_get_display_name(gc);
 		if (!me)
 			me = conv->account->username;
 		who = me;