# HG changeset patch # User Mark Doliner # Date 1163717265 0 # Node ID 0a9c44ce9a4a9b6b280190de0d15cf25df243eb6 # Parent f4705e2c20260efb4836eb1da454d75de486d30e [gaim-migrate @ 17760] Get rid of serv_set_buddyicon(). Moved the code directly into gaim_account_set_buddy_icon(). committer: Tailor Script diff -r f4705e2c2026 -r 0a9c44ce9a4a libgaim/account.c --- 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(); diff -r f4705e2c2026 -r 0a9c44ce9a4a libgaim/plugins/perl/common/Server.xs --- 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 diff -r f4705e2c2026 -r 0a9c44ce9a4a libgaim/server.c --- 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 diff -r f4705e2c2026 -r 0a9c44ce9a4a libgaim/server.h --- 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);