changeset 2497:be88e02789e0

[gaim-migrate @ 2510] this is not necessary for the icons we use but if someone wants to use different icons it's a nice thing to do. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 13 Oct 2001 03:23:55 +0000
parents f0a2a9afdb77
children bd66482296f9
files src/applet.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/applet.c	Sat Oct 13 00:06:18 2001 +0000
+++ b/src/applet.c	Sat Oct 13 03:23:55 2001 +0000
@@ -84,10 +84,16 @@
 	}
 
 	art_affine_identity(affine);
-	art_rgb_rgba_affine(dst, 0, 0, sizehint, sizehint, sizehint * 3,
-			gdk_pixbuf_get_pixels(pb),
-			gdk_pixbuf_get_width(pb), gdk_pixbuf_get_height(pb),
-			gdk_pixbuf_get_rowstride(pb), affine, ART_FILTER_NEAREST, NULL);
+	if (gdk_pixbuf_get_has_alpha(pb))
+		art_rgb_rgba_affine(dst, 0, 0, sizehint, sizehint, sizehint * 3,
+				gdk_pixbuf_get_pixels(pb), gdk_pixbuf_get_width(pb),
+				gdk_pixbuf_get_height(pb), gdk_pixbuf_get_rowstride(pb),
+				affine, ART_FILTER_NEAREST, NULL);
+	else
+		art_rgb_affine(dst, 0, 0, sizehint, sizehint, sizehint * 3,
+				gdk_pixbuf_get_pixels(pb), gdk_pixbuf_get_width(pb),
+				gdk_pixbuf_get_height(pb), gdk_pixbuf_get_rowstride(pb),
+				affine, ART_FILTER_NEAREST, NULL);
 
 	gdk_pixbuf_unref(pb);
 	gdk_draw_rgb_image(cache, gc, 0, 0, sizehint, sizehint,