im.pidgin.pidgin: 7a17d421ad7600c57d0ecdb59f7881de03bf2027

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Feb 24 12:55:45 EST 2008


-----------------------------------------------------------------
Revision: 7a17d421ad7600c57d0ecdb59f7881de03bf2027
Ancestor: 7a8f58fc7611c332a05ed1c1b8417be24c9cf981
Author: rekkanoryo at pidgin.im
Date: 2008-02-22T00:11:25
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7a17d421ad7600c57d0ecdb59f7881de03bf2027

Modified files:
        libpurple/blist.c libpurple/conversation.c

ChangeLog: 

Kill off some uses of account->gc.

-------------- next part --------------
============================================================
--- libpurple/blist.c	255777faa61869c79f5bf76ab8ce032da1ff216b
+++ libpurple/blist.c	303cce32a1214e4a724f19817c2e4644b956eb4f
@@ -1588,7 +1588,7 @@ void purple_blist_add_contact(PurpleCont
 					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 @@ void purple_blist_add_contact(PurpleCont
 					 * 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 @@ const char *purple_chat_get_name(PurpleC
 	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);
============================================================
--- libpurple/conversation.c	0d3b0c408e6e0980d7b9faadd4f4414e27206540
+++ libpurple/conversation.c	91daa642a7b1b219f3549cd1ca7a61dec598baf2
@@ -209,11 +209,14 @@ add_message_to_history(PurpleConversatio
 		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;


More information about the Commits mailing list