Mercurial > pidgin.yaz
changeset 14982:0a9c44ce9a4a
[gaim-migrate @ 17760]
Get rid of serv_set_buddyicon(). Moved the code directly
into gaim_account_set_buddy_icon().
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 16 Nov 2006 22:47:45 +0000 |
parents | f4705e2c2026 |
children | 9ddfd5c846f9 |
files | libgaim/account.c libgaim/plugins/perl/common/Server.xs libgaim/server.c libgaim/server.h |
diffstat | 4 files changed, 12 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/account.c Thu Nov 16 20:07:19 2006 +0000 +++ b/libgaim/account.c Thu Nov 16 22:47:45 2006 +0000 @@ -1270,9 +1270,18 @@ account->buddy_icon = g_strdup(icon); if (gaim_account_is_connected(account)) { - char *filename = gaim_buddy_icons_get_full_path(icon); - serv_set_buddyicon(gaim_account_get_connection(account), filename); - g_free(filename); + GaimConnection *gc; + GaimPluginProtocolInfo *prpl_info; + + gc = gaim_account_get_connection(account); + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); + + if (prpl_info && prpl_info->set_buddy_icon) + { + char *filename = gaim_buddy_icons_get_full_path(icon); + prpl_info->set_buddy_icon(gc, filename); + g_free(filename); + } } schedule_accounts_save();
--- a/libgaim/plugins/perl/common/Server.xs Thu Nov 16 20:07:19 2006 +0000 +++ b/libgaim/plugins/perl/common/Server.xs Thu Nov 16 22:47:45 2006 +0000 @@ -206,11 +206,6 @@ Gaim::TypingState state void -serv_set_buddyicon(gc, filename) - Gaim::Connection gc - const char *filename - -void serv_set_info(con, a) Gaim::Connection con const char * a
--- a/libgaim/server.c Thu Nov 16 20:07:19 2006 +0000 +++ b/libgaim/server.c Thu Nov 16 22:47:45 2006 +0000 @@ -414,18 +414,6 @@ return val; } -void serv_set_buddyicon(GaimConnection *gc, const char *filename) -{ - GaimPluginProtocolInfo *prpl_info = NULL; - - if (gc->prpl != NULL) - prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); - - if (prpl_info && prpl_info->set_buddy_icon) - prpl_info->set_buddy_icon(gc, filename); - -} - /* * woo. i'm actually going to comment this function. isn't that fun. make * sure to follow along, kids
--- a/libgaim/server.h Thu Nov 16 20:07:19 2006 +0000 +++ b/libgaim/server.h Thu Nov 16 22:47:45 2006 +0000 @@ -91,7 +91,6 @@ void serv_got_im(GaimConnection *gc, const char *who, const char *msg, GaimMessageFlags flags, time_t mtime); -void serv_set_buddyicon(GaimConnection *gc, const char *filename); void serv_got_chat_invite(GaimConnection *gc, const char *name, const char *who, const char *message, GHashTable *data);