# HG changeset patch # User John Bailey # Date 1203639085 0 # Node ID 6fc8f0c825e03e4240fe328e6c24242ae8123a1c # Parent 42724bd41274ac6e1aa18e6d87c6dd36d24aa5cd Kill off some uses of account->gc. diff -r 42724bd41274 -r 6fc8f0c825e0 libpurple/blist.c --- a/libpurple/blist.c Wed Feb 20 05:07:09 2008 +0000 +++ b/libpurple/blist.c Fri Feb 22 00:11:25 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); diff -r 42724bd41274 -r 6fc8f0c825e0 libpurple/conversation.c --- a/libpurple/conversation.c Wed Feb 20 05:07:09 2008 +0000 +++ b/libpurple/conversation.c Fri Feb 22 00:11:25 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;