aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-pixbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-cell-pixbuf.c')
-rw-r--r--widgets/table/e-cell-pixbuf.c24
1 files changed, 20 insertions, 4 deletions
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 <stdio.h>
-#include <libgnomeui/gnome-canvas.h>
+#include <libgnomecanvas/gnome-canvas.h>
#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);