aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-icon-factory.c
diff options
context:
space:
mode:
authorTobias Mueller <muelli@auftrags-killer.org>2007-08-18 20:33:50 +0800
committerTobias Mueller <tobiasmue@src.gnome.org>2007-08-18 20:33:50 +0800
commitd1147114a2605fd39d03fc71bbae458009f17496 (patch)
tree7df9dc773461b310a61fb4a9e2ba58da2191aefe /e-util/e-icon-factory.c
parentc12dec478d52851234822b390fee66624acc207a (diff)
downloadgsoc2013-evolution-d1147114a2605fd39d03fc71bbae458009f17496.tar.gz
gsoc2013-evolution-d1147114a2605fd39d03fc71bbae458009f17496.tar.zst
gsoc2013-evolution-d1147114a2605fd39d03fc71bbae458009f17496.zip
patch by: Tim Yamin <plasm@roo.me.uk> reviewed by: Srinivasa Ragavan
2007-08-18 Tobias Mueller <muelli@auftrags-killer.org> patch by: Tim Yamin <plasm@roo.me.uk> reviewed by: Srinivasa Ragavan <sragavan@novell.com> * e-icon-factory.c: (load_icon): Optimize pixbuf behaviour, fixes #465573 svn path=/trunk/; revision=34031
Diffstat (limited to 'e-util/e-icon-factory.c')
-rw-r--r--e-util/e-icon-factory.c8
1 files changed, 6 insertions, 2 deletions
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;
}