[goffice] Remove ifdef GOFFICE_WITH_GTK around gdk_pixbuf calls.
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Remove ifdef GOFFICE_WITH_GTK around gdk_pixbuf calls.
- Date: Wed, 14 Nov 2012 12:09:07 +0000 (UTC)
commit 7dd2b346bd80bfba7f9489afc1db78efdba24a14
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed Nov 14 13:08:05 2012 +0100
Remove ifdef GOFFICE_WITH_GTK around gdk_pixbuf calls.
ChangeLog | 6 ++++++
goffice/graph/gog-renderer.c | 10 +---------
2 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 814c7d4..71adf5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-14 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/graph/gog-renderer.c (gog_renderer_get_pixbuf),
+ (_gsf_gdk_pixbuf_save), (gog_renderer_export_image): removed ifdef
+ GOFFICE_WITH_GTK around gdk_pixbuf calls.
+
2012-11-12 Jean Brefort <jean brefort normalesup org>
* goffice/graph/gog-theme.c (theme_loaded): fixed series style.
diff --git a/goffice/graph/gog-renderer.c b/goffice/graph/gog-renderer.c
index ff18391..8324c74 100644
--- a/goffice/graph/gog-renderer.c
+++ b/goffice/graph/gog-renderer.c
@@ -1422,7 +1422,6 @@ gog_renderer_get_pixbuf (GogRenderer *rend)
if (rend->cairo_surface == NULL)
return NULL;
-#ifdef GOFFICE_WITH_GTK
if (rend->pixbuf == NULL) {
int width = cairo_image_surface_get_width (rend->cairo_surface);
int height = cairo_image_surface_get_height (rend->cairo_surface);
@@ -1432,8 +1431,7 @@ gog_renderer_get_pixbuf (GogRenderer *rend)
rend->pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, TRUE, 8,
width, height, rowstride, NULL, NULL);
go_cairo_convert_data_to_pixbuf (data, NULL, width, height, rowstride);
- }
-#endif
+ }#endif
return rend->pixbuf;
}
@@ -1446,7 +1444,6 @@ gog_renderer_get_cairo_surface (GogRenderer *rend)
return rend->cairo_surface;
}
-#ifdef GOFFICE_WITH_GTK
static gboolean
_gsf_gdk_pixbuf_save (const gchar *buf,
gsize count,
@@ -1461,7 +1458,6 @@ _gsf_gdk_pixbuf_save (const gchar *buf,
return ok;
}
-#endif
static cairo_status_t
_cairo_write_func (void *closure,
@@ -1539,10 +1535,8 @@ gog_renderer_export_image (GogRenderer *rend, GOImageFormat format,
cairo_surface_t *surface = NULL;
gboolean status;
GdkPixbuf *pixbuf;
-#ifdef GOFFICE_WITH_GTK
GdkPixbuf *output_pixbuf;
gboolean result;
-#endif
double width_in_pts, height_in_pts;
g_return_val_if_fail (GOG_IS_RENDERER (rend), FALSE);
@@ -1609,7 +1603,6 @@ do_export_vectorial:
if (pixbuf == NULL)
return FALSE;
format_info = go_image_get_format_info (format);
-#ifdef GOFFICE_WITH_GTK
if (!format_info->alpha_support)
output_pixbuf = gdk_pixbuf_composite_color_simple
(pixbuf,
@@ -1627,7 +1620,6 @@ do_export_vectorial:
if (!format_info->alpha_support)
g_object_unref (output_pixbuf);
return result;
-#endif
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]