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

markdoliner at markdoliner at
Wed Apr 21 00:46:07 EDT 2010

Revision: 969e59be9427372379d3058f5560281abb9beea7
Ancestor: 7850267e7626c94b519fd5f1c959c79f0624d34e
Author: markdoliner at
Date: 2010-04-21T04:42:32
Branch: im.pidgin.pidgin

Modified files:


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;
 		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);

More information about the Commits mailing list