Mercurial > pidgin
changeset 29769:1a4362fca50e
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.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 21 Apr 2010 04:42:32 +0000 |
parents | e68d6c7990c1 |
children | 9e9c20b705d3 |
files | pidgin/gtkutils.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkutils.c Tue Apr 20 21:17:12 2010 +0000 +++ b/pidgin/gtkutils.c Wed Apr 21 04:42:32 2010 +0000 @@ -2507,7 +2507,7 @@ 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));