pidgin: 969e59be: Oh! When setting a buddy icon, when we ...

markdoliner at pidgin.im markdoliner at pidgin.im
Wed Apr 21 00:46:07 EDT 2010


-----------------------------------------------------------------
Revision: 969e59be9427372379d3058f5560281abb9beea7
Ancestor: 7850267e7626c94b519fd5f1c959c79f0624d34e
Author: markdoliner at pidgin.im
Date: 2010-04-21T04:42:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/969e59be9427372379d3058f5560281abb9beea7

Modified files:
        pidgin/gtkutils.c

ChangeLog: 

Oh!  When setting a buddy icon, when we reduce the dimension in order to
make the icon smaller than the max file size, make sure we respect the
minimum dimensions specified by the prpl.  I guess I removed this when
I made this code awesome.  Probably not a huge problem, though--it's the
difference between trying to set an icon that is "too small" or just
bailing out immediately and telling the user to pick a different image.

-------------- next part --------------
============================================================
--- pidgin/gtkutils.c	902207c3b7ce7c92edcdbb95f1d15eceac560ace
+++ pidgin/gtkutils.c	c660e835dcf547e5580da7824933b3d2975b501e
@@ -2507,7 +2507,7 @@ pidgin_convert_buddy_icon(PurplePlugin *
 		new_height = orig_height * scale_factor;
 		g_object_unref(G_OBJECT(pixbuf));
 		pixbuf = gdk_pixbuf_scale_simple(original, new_width, new_height, GDK_INTERP_HYPER);
-	} while (new_width > 10 || new_height > 10);
+	} while ((new_width > 10 || new_height > 10) && new_width > spec->min_width && new_height > spec->min_height);
 	g_strfreev(prpl_formats);
 	g_object_unref(G_OBJECT(pixbuf));
 	g_object_unref(G_OBJECT(original));


More information about the Commits mailing list