aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog8
-rw-r--r--e-util/e-icon-factory.c8
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 <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
+
2007-08-07 Sankar P <psankar@novell.com>
reviewed by: Srinivasa Ragavan <sragavan@novell.com>
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;
}