pidgin/gtkblist.c

branch
soc.2013.gobjectification.plugins
changeset 37134
07746c9a04bf
parent 37133
832cd077145e
parent 35818
f01e2638301f
child 37136
cfa7c57f9ca5
--- a/pidgin/gtkblist.c	Mon Apr 07 20:02:22 2014 +0530
+++ b/pidgin/gtkblist.c	Fri Apr 11 16:23:12 2014 +0530
@@ -2660,7 +2660,7 @@
 	PurpleBuddyIcon *icon = NULL;
 	PurpleAccount *account = NULL;
 	PurpleContact *contact = NULL;
-	PurpleStoredImage *custom_img;
+	PurpleImage *custom_img;
 	PurpleProtocol *protocol = NULL;
 	PurpleBuddyIconSpec *icon_spec = NULL;
 	gint orig_width, orig_height, scale_width, scale_height;
@@ -2704,8 +2704,8 @@
 	}
 
 	if (custom_img) {
-		data = purple_imgstore_get_data(custom_img);
-		len = purple_imgstore_get_size(custom_img);
+		data = purple_image_get_data(custom_img);
+		len = purple_image_get_size(custom_img);
 	}
 
 	if (data == NULL) {
@@ -2723,17 +2723,18 @@
 	buf = pidgin_pixbuf_from_data(data, len);
 	purple_buddy_icon_unref(icon);
 	if (!buf) {
-		purple_debug_warning("gtkblist", "Couldn't load buddy icon "
-				"on account %s (%s)  buddyname=%s  "
-				"custom_img_data=%p\n",
-				account ? purple_account_get_username(account) : "(no account)",
-				account ? purple_account_get_protocol_id(account) : "(no account)",
-				buddy ? purple_buddy_get_name(buddy) : "(no buddy)",
-				custom_img ? purple_imgstore_get_data(custom_img) : NULL);
-		purple_imgstore_unref(custom_img);
+		purple_debug_warning("gtkblist", "Couldn't load buddy icon on "
+			"account %s (%s); buddyname=%s; custom_img_size=%" G_GSIZE_FORMAT,
+			account ? purple_account_get_username(account) : "(no account)",
+			account ? purple_account_get_protocol_id(account) : "(no account)",
+			buddy ? purple_buddy_get_name(buddy) : "(no buddy)",
+			custom_img ? purple_image_get_size(custom_img) : 0);
+		if (custom_img)
+			g_object_unref(custom_img);
 		return NULL;
 	}
-	purple_imgstore_unref(custom_img);
+	if (custom_img)
+		g_object_unref(custom_img);
 
 	if (greyed) {
 		gboolean offline = FALSE, idle = FALSE;

mercurial