From 613453b1095e325149b8d37e5731d415e1d5f9bd Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 31 Oct 2002 21:30:57 +0000 Subject: merging the gal-2 branch back to the trunk. merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471 --- widgets/table/e-cell-pixbuf.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'widgets/table/e-cell-pixbuf.c') diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 3fc8ead3f9..d58a75dd1c 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -22,7 +22,7 @@ */ #include -#include +#include #include "e-cell-pixbuf.h" static ECellClass *parent_class; @@ -43,6 +43,23 @@ enum { ARG_UNSELECTED_COLUMN }; +static int +gnome_print_pixbuf (GnomePrintContext *pc, GdkPixbuf *pixbuf) +{ + if (gdk_pixbuf_get_has_alpha (pixbuf)) + return gnome_print_rgbaimage (pc, + gdk_pixbuf_get_pixels (pixbuf), + gdk_pixbuf_get_width (pixbuf), + gdk_pixbuf_get_height (pixbuf), + gdk_pixbuf_get_rowstride (pixbuf)); + else + return gnome_print_rgbimage (pc, + gdk_pixbuf_get_pixels (pixbuf), + gdk_pixbuf_get_width (pixbuf), + gdk_pixbuf_get_height (pixbuf), + gdk_pixbuf_get_rowstride (pixbuf)); +} + /* * ECellPixbuf functions */ @@ -370,7 +387,7 @@ e_cell_pixbuf_class_init (GtkObjectClass *object_class) GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_UNSELECTED_COLUMN); } -guint +GtkType e_cell_pixbuf_get_type (void) { static guint type = 0; @@ -382,8 +399,7 @@ e_cell_pixbuf_get_type (void) sizeof (ECellPixbufClass), (GtkClassInitFunc) e_cell_pixbuf_class_init, (GtkObjectInitFunc) e_cell_pixbuf_init, - NULL, - NULL, + NULL, NULL, }; type = gtk_type_unique (e_cell_get_type (), &type_info); -- cgit v1.2.3