changeset 23121:2498242c7af7

Make pidgin_set_custom_buddy_icon use the purple_buddy_icons_node_set_custom_icon_from_file convenience function. Also, I noticed that the custom buddy icons (which are set on contacts) were being converted according to the prpl icon specifications of whichever buddy in the contact was used in the pidgin_set_custom_buddy_icon call, since I have no earthly idea why we would want to do that I'm dropping it.
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 15 May 2008 03:26:46 +0000
parents 4044655e5615
children f6c57e6e8a89
files pidgin/gtkutils.c
diffstat 1 files changed, 1 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkutils.c	Thu May 15 02:35:53 2008 +0000
+++ b/pidgin/gtkutils.c	Thu May 15 03:26:46 2008 +0000
@@ -2873,8 +2873,6 @@
 {
 	PurpleBuddy *buddy;
 	PurpleContact *contact;
-	gpointer data = NULL;
-	size_t len = 0;
 
 	buddy = purple_find_buddy(account, who);
 	if (!buddy) {
@@ -2883,19 +2881,7 @@
 	}
 
 	contact = purple_buddy_get_contact(buddy);
-
-	if (filename) {
-		const char *prpl_id = purple_account_get_protocol_id(account);
-		PurplePlugin *prpl = purple_find_prpl(prpl_id);
-
-		data = pidgin_convert_buddy_icon(prpl, filename, &len);
-
-		/* We don't want to delete the old icon if the new one didn't load. */
-		if (data == NULL)
-			return;
-	}
-
-	purple_buddy_icons_node_set_custom_icon(contact, data, len);
+	purple_buddy_icons_node_set_custom_icon_from_file((PurpleBlistNode*)contact, filename);
 }
 
 char *pidgin_make_pretty_arrows(const char *str)