Mercurial > pidgin.yaz
changeset 22317:6fc8f0c825e0
Kill off some uses of account->gc.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Fri, 22 Feb 2008 00:11:25 +0000 |
parents | 42724bd41274 |
children | 10f9cc2808ec |
files | libpurple/blist.c libpurple/conversation.c |
diffstat | 2 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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;