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
This commit is contained in:
Tobias Mueller
2007-08-18 12:33:50 +00:00
committed by Tobias Mueller
parent c12dec478d
commit d1147114a2
2 changed files with 14 additions and 2 deletions

View File

@ -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>

View File

@ -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;
}