[goffice] make without-gtk build work again



commit 5f1108d8912f4ad89da4a089cfbcd17dde1fab1f
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sun Sep 27 09:49:40 2009 +0200

    make without-gtk build work again

 ChangeLog                                    |   15 +++++++++++++++
 goffice/component/go-component.h             |    2 --
 goffice/goffice.h                            |    6 ++++++
 goffice/graph/Makefile.am                    |    4 ++--
 goffice/graph/goffice-graph.h                |    4 ++++
 goffice/utils/go-color.h                     |    4 ----
 plugins/plot_barcol/gog-barcol.c             |    4 ++++
 plugins/plot_pie/gog-pie.c                   |    8 ++++++++
 plugins/plot_radar/gog-color-polar-prefs.xml |   25 -------------------------
 plugins/plot_xy/gog-xy.c                     |    5 ++++-
 tests/Makefile.am                            |    3 +++
 11 files changed, 46 insertions(+), 34 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 50666d0..0ce8d25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2009-09-27  Jean Brefort  <jean brefort normalesup org>
 
+	* goffice/component/go-component.h: cleaned includes.
+	* goffice/goffice.h: make without-gtk build work again.
+	* goffice/graph/Makefile.am: ditto.
+	* goffice/graph/goffice-graph.h: ditto.
+	* goffice/utils/go-color.h: ditto.
+	* plugins/plot_barcol/gog-barcol.c (gog_barcol_plot_class_init):
+	* plugins/plot_pie/gog-pie.c (gog_pie_plot_class_init),
+	(gog_ring_plot_class_init): ditto.
+	* plugins/plot_radar/gog-color-polar-prefs.xml: removed unused file.
+	* plugins/plot_xy/gog-xy.c (gog_bubble_plot_class_init): make without-gtk
+	build work again.
+	* tests/Makefile.am: make check works without gtk.
+
+2009-09-27  Jean Brefort  <jean brefort normalesup org>
+
 	* goffice/utils/go-style-prefs.ui: fixed unicolor gradients brightness.
 	* goffice/utils/go-style.c (fill_gradient_init),
 	(cb_fill_type_changed), (go_style_set_fill_brightness): ditto.
diff --git a/goffice/component/go-component.h b/goffice/component/go-component.h
index 48ee81e..255c9bb 100644
--- a/goffice/component/go-component.h
+++ b/goffice/component/go-component.h
@@ -23,9 +23,7 @@
 #define GO_COMPONENT_H
 
 #include <glib-object.h>
-#include <gtk/gtk.h>
 #include <goffice/goffice.h>
-#include <goffice/app/goffice-app.h>
 #include <goffice/component/goffice-component.h>
 
 G_BEGIN_DECLS
diff --git a/goffice/goffice.h b/goffice/goffice.h
index cac7f58..cdb34d0 100644
--- a/goffice/goffice.h
+++ b/goffice/goffice.h
@@ -24,6 +24,12 @@
 #include <glib.h>
 #include <goffice/goffice-features.h>
 
+#ifdef GOFFICE_WITH_GTK
+#include <gtk/gtk.h>
+#else
+#include <pango/pango.h>
+#endif
+
 #ifndef GO_VAR_DECL
 #  ifdef WIN32
 #    ifdef GOFFICE_COMPILATION
diff --git a/goffice/graph/Makefile.am b/goffice/graph/Makefile.am
index 59e0fa0..7ef2c07 100644
--- a/goffice/graph/Makefile.am
+++ b/goffice/graph/Makefile.am
@@ -31,7 +31,6 @@ libgoffice_graph_la_SOURCES = \
 	gog-reg-curve.c			\
 	gog-smoothed-curve.c	\
 	gog-series-lines.c		\
-	gog-data-allocator.c		\
 	gog-data-set.c			\
 	\
 	gog-renderer.c
@@ -69,14 +68,15 @@ libgoffice_graph_la_HEADERS = \
 	gog-reg-curve.h			\
 	gog-smoothed-curve.h		\
 	gog-series-lines.h		\
-	gog-data-allocator.h		\
 	gog-data-set.h			\
 	gog-renderer.h
 
 if WITH_GTK
   libgoffice_graph_la_SOURCES += gog-guru.c			\
+				 gog-data-allocator.c		\
 				 gog-child-button.c
   libgoffice_graph_la_HEADERS += gog-guru.h			\
+				 gog-data-allocator.h		\
 				 gog-child-button.h
 endif
 
diff --git a/goffice/graph/goffice-graph.h b/goffice/graph/goffice-graph.h
index 9386aae..75eb85e 100644
--- a/goffice/graph/goffice-graph.h
+++ b/goffice/graph/goffice-graph.h
@@ -224,8 +224,10 @@ G_END_DECLS
 #include <goffice/graph/gog-chart-impl.h>
 #include <goffice/graph/gog-chart-map.h>
 #include <goffice/graph/gog-chart-map-3d.h>
+#ifdef GOFFICE_WITH_GTK
 #include <goffice/graph/gog-child-button.h>
 #include <goffice/graph/gog-data-allocator.h>
+#endif
 #ifdef GOFFICE_WITH_LASEM
 #include <goffice/graph/gog-equation.h>
 #endif
@@ -234,7 +236,9 @@ G_END_DECLS
 #include <goffice/graph/gog-graph-impl.h>
 #include <goffice/graph/gog-grid.h>
 #include <goffice/graph/gog-grid-line.h>
+#ifdef GOFFICE_WITH_GTK
 #include <goffice/graph/gog-guru.h>
+#endif
 #include <goffice/graph/gog-label.h>
 #include <goffice/graph/gog-legend.h>
 #include <goffice/graph/gog-object-xml.h>
diff --git a/goffice/utils/go-color.h b/goffice/utils/go-color.h
index 3c110eb..b3a7cd5 100644
--- a/goffice/utils/go-color.h
+++ b/goffice/utils/go-color.h
@@ -28,10 +28,6 @@
 
 #include <goffice/goffice.h>
 
-#ifdef GOFFICE_WITH_GTK
-#include <gdk/gdk.h>
-#endif
-
 G_BEGIN_DECLS
 
 typedef struct {
diff --git a/plugins/plot_barcol/gog-barcol.c b/plugins/plot_barcol/gog-barcol.c
index 7e385c9..2dfc3b2 100644
--- a/plugins/plot_barcol/gog-barcol.c
+++ b/plugins/plot_barcol/gog-barcol.c
@@ -138,6 +138,7 @@ gog_barcol_plot_type_name (G_GNUC_UNUSED GogObject const *item)
 	return N_("PlotBarCol");
 }
 
+#ifdef GOFFICE_WITH_GTK
 extern gpointer gog_barcol_plot_pref (GogBarColPlot *barcol, GOCmdContext *cc);
 static void
 gog_barcol_plot_populate_editor (GogObject *item,
@@ -150,6 +151,7 @@ gog_barcol_plot_populate_editor (GogObject *item,
 	g_object_unref (w);
 	(GOG_OBJECT_CLASS(gog_barcol_parent_klass)->populate_editor) (item, editor, dalloc, cc);
 }
+#endif
 
 static gboolean
 gog_barcol_swap_x_and_y (GogPlot1_5d *model)
@@ -257,7 +259,9 @@ gog_barcol_plot_class_init (GogPlot1_5dClass *gog_plot_1_5d_klass)
 			GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
 
 	gog_object_klass->type_name	= gog_barcol_plot_type_name;
+#ifdef GOFFICE_WITH_GTK
 	gog_object_klass->populate_editor	= gog_barcol_plot_populate_editor;
+#endif
 	gog_object_klass->view_type	= gog_barcol_view_get_type ();
 
 	plot_klass->desc.series.style_fields	= GO_STYLE_OUTLINE | GO_STYLE_FILL;
diff --git a/plugins/plot_pie/gog-pie.c b/plugins/plot_pie/gog-pie.c
index 3132023..195ae4c 100644
--- a/plugins/plot_pie/gog-pie.c
+++ b/plugins/plot_pie/gog-pie.c
@@ -196,6 +196,7 @@ gog_pie_plot_type_name (G_GNUC_UNUSED GogObject const *item)
 	return N_("PlotPie");
 }
 
+#ifdef GOFFICE_WITH_GTK
 extern gpointer gog_pie_plot_pref (GogPiePlot *pie, GOCmdContext *cc);
 static void
 gog_pie_plot_populate_editor (GogObject *item,
@@ -211,6 +212,7 @@ gog_pie_plot_populate_editor (GogObject *item,
 
 	(GOG_OBJECT_CLASS(pie_parent_klass)->populate_editor) (item, editor, dalloc, cc);
 }
+#endif
 
 static void
 gog_pie_plot_update (GogObject *obj)
@@ -230,7 +232,9 @@ gog_pie_plot_class_init (GogPlotClass *plot_klass)
 
 	gog_klass->update	= gog_pie_plot_update;
 	gog_klass->type_name	= gog_pie_plot_type_name;
+#ifdef GOFFICE_WITH_GTK
 	gog_klass->populate_editor = gog_pie_plot_populate_editor;
+#endif
 	gog_klass->view_type	= gog_pie_view_get_type ();
 
 	g_object_class_install_property (gobject_klass, PLOT_PROP_INITIAL_ANGLE,
@@ -344,6 +348,7 @@ gog_ring_plot_type_name (G_GNUC_UNUSED GogObject const *item)
 	return N_("PlotRing");
 }
 
+#ifdef GOFFICE_WITH_GTK
 extern gpointer gog_ring_plot_pref (GogRingPlot *ring, GOCmdContext *cc);
 static void
 gog_ring_plot_populate_editor (GogObject *item,
@@ -357,6 +362,7 @@ gog_ring_plot_populate_editor (GogObject *item,
 			     _("Properties"));
 	g_object_unref (G_OBJECT (widget));
 }
+#endif
 
 static void
 gog_ring_plot_class_init (GogPiePlotClass *pie_plot_klass)
@@ -370,7 +376,9 @@ gog_ring_plot_class_init (GogPiePlotClass *pie_plot_klass)
 	gobject_klass->get_property = gog_ring_plot_get_property;
 
 	gog_klass->type_name	= gog_ring_plot_type_name;
+#ifdef GOFFICE_WITH_GTK
 	gog_klass->populate_editor = gog_ring_plot_populate_editor;
+#endif
 
 	g_object_class_install_property (gobject_klass, RING_PLOT_PROP_CENTER_SIZE,
 		g_param_spec_float ("center-size",
diff --git a/plugins/plot_xy/gog-xy.c b/plugins/plot_xy/gog-xy.c
index 576e361..cc7f49a 100644
--- a/plugins/plot_xy/gog-xy.c
+++ b/plugins/plot_xy/gog-xy.c
@@ -416,6 +416,7 @@ gog_bubble_plot_type_name (G_GNUC_UNUSED GogObject const *item)
 	return N_("PlotBubble");
 }
 
+#ifdef GOFFICE_WITH_GTK
 extern gpointer gog_bubble_plot_pref (GogBubblePlot *bubble, GOCmdContext *cc);
 static void
 gog_bubble_plot_populate_editor (GogObject *obj,
@@ -429,6 +430,7 @@ gog_bubble_plot_populate_editor (GogObject *obj,
 
 	(GOG_OBJECT_CLASS(bubble_parent_klass)->populate_editor) (obj, editor, dalloc, cc);
 }
+#endif
 
 enum {
 	GOG_BUBBLE_PROP_0,
@@ -504,8 +506,9 @@ gog_bubble_plot_class_init (GogPlotClass *plot_klass)
 	gobject_klass->get_property = gog_bubble_plot_get_property;
 
 	gog_klass->type_name	= gog_bubble_plot_type_name;
+#ifdef GOFFICE_WITH_GTK
 	gog_klass->populate_editor	= gog_bubble_plot_populate_editor;
-
+#endif
 	gog_2d_plot_klass->adjust_bounds = gog_bubble_plot_adjust_bounds;
 
 	g_object_class_install_property (gobject_klass, GOG_BUBBLE_PROP_AS_AREA,
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 11f8e73..1739198 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,6 @@
+if WITH_GTK
 check_PROGRAMS = pie-demo go-demo 
+endif
 
 include $(top_srcdir)/goffice.mk
 
@@ -11,3 +13,4 @@ go_demo_LDADD = $(GOFFICE_PLUGIN_LIBADD)
 go_demo_SOURCES = go-demo.c
 
 EXTRA_DIST = go-demo.ui
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]