pidgin.next.minor: 6f95c092: Make pidgin_set_custom_buddy_icon use th...

deryni at pidgin.im deryni at pidgin.im
Sat May 17 16:16:46 EDT 2008


-----------------------------------------------------------------
Revision: 6f95c092ac2551b9a39ac2bf1586e43c3f033a61
Ancestor: c05448b8ba5492b14d3dc0e20a07dac542d2b6ee
Author: deryni at pidgin.im
Date: 2008-05-15T03:26:46
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/6f95c092ac2551b9a39ac2bf1586e43c3f033a61

Modified files:
        pidgin/gtkutils.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- pidgin/gtkutils.c	a523d52ed04714c7e39ee2a141f17b3a10dae591
+++ pidgin/gtkutils.c	29d7ce72f5aef4a064bfa015392952a26e4da41f
@@ -2873,8 +2873,6 @@ void pidgin_set_custom_buddy_icon(Purple
 {
 	PurpleBuddy *buddy;
 	PurpleContact *contact;
-	gpointer data = NULL;
-	size_t len = 0;
 
 	buddy = purple_find_buddy(account, who);
 	if (!buddy) {
@@ -2883,19 +2881,7 @@ void pidgin_set_custom_buddy_icon(Purple
 	}
 
 	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)


More information about the Commits mailing list