From d1147114a2605fd39d03fc71bbae458009f17496 Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Sat, 18 Aug 2007 12:33:50 +0000 Subject: patch by: Tim Yamin reviewed by: Srinivasa Ragavan 2007-08-18 Tobias Mueller patch by: Tim Yamin reviewed by: Srinivasa Ragavan * e-icon-factory.c: (load_icon): Optimize pixbuf behaviour, fixes #465573 svn path=/trunk/; revision=34031 --- e-util/ChangeLog | 8 ++++++++ e-util/e-icon-factory.c | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 9c2a4fb489..47239435fb 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,11 @@ +2007-08-18 Tobias Mueller + + patch by: Tim Yamin + reviewed by: Srinivasa Ragavan + + * e-icon-factory.c: (load_icon): + Optimize pixbuf behaviour, fixes #465573 + 2007-08-07 Sankar P reviewed by: Srinivasa Ragavan diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c index 36008613be..1f24471e11 100644 --- a/e-util/e-icon-factory.c +++ b/e-util/e-icon-factory.c @@ -159,8 +159,12 @@ load_icon (const char *icon_key, const char *icon_name, int size, int scale) g_free (filename); if (unscaled != NULL) { - pixbuf = gdk_pixbuf_scale_simple (unscaled, size, size, GDK_INTERP_BILINEAR); - g_object_unref (unscaled); + if(gdk_pixbuf_get_width(unscaled) != size || gdk_pixbuf_get_height(unscaled) != size) + { + pixbuf = gdk_pixbuf_scale_simple (unscaled, size, size, GDK_INTERP_BILINEAR); + g_object_unref (unscaled); + } else + pixbuf = unscaled; } else { pixbuf = NULL; } -- cgit v1.2.3