[goffice] Fix --without-gtk win32 build (Bobby Powers). [#619312]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix --without-gtk win32 build (Bobby Powers). [#619312]
- Date: Fri, 28 May 2010 09:03:35 +0000 (UTC)
commit bcf24c8d44b811927ca8555ca4c9bfc43ca30473
Author: Jean Brefort <jean brefort normalesup org>
Date: Fri May 28 11:02:42 2010 +0200
Fix --without-gtk win32 build (Bobby Powers). [#619312]
ChangeLog | 14 ++++++++++++++
NEWS | 5 ++++-
goffice/Makefile.am | 17 ++++++++++++-----
goffice/graph/gog-3d-box.c | 2 ++
goffice/graph/gog-axis-line.c | 8 ++++++--
goffice/graph/gog-axis.c | 2 ++
goffice/graph/gog-renderer.c | 7 +++++--
goffice/graph/gog-styled-object.c | 4 ++++
goffice/ms-compat/Makefile.am | 18 ++++++++++++------
goffice/utils/Makefile.am | 4 ++--
goffice/utils/go-style.h | 2 ++
plugins/plot_pie/gog-pie.c | 4 ++++
12 files changed, 69 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f1669d1..b29730c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-05-28 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/Makefile.am: appiled patch from Bobby Powers: fix --without-gtk
+ win32 build.
+ * goffice/graph/gog-styled-object.c (gog_styled_object_class_init): ditto.
+ * goffice/ms-compat/Makefile.am: ditto.
+ * goffice/utils/go-style.h: ditto.
+ * goffice/graph/gog-3d-box.c (gog_3d_box_class_init): fixed all warnings
+ for the without-gtk build.
+ * goffice/graph/gog-axis-line.c: ditto.
+ * goffice/graph/gog-axis.c: ditto.
+ * goffice/graph/gog-renderer.c (gog_renderer_export_image): ditto.
+ * plugins/plot_pie/gog-pie.c: ditto.
+
2010-05-23 Morten Welinder <terra gnome org>
* goffice/math/go-rangefunc.c (go_range_sumsq): Do square in
diff --git a/NEWS b/NEWS
index 0f4dac0..cd0603f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
goffice 0.8.5:
+Bobby Powers:
+ * Fix the --without-gtk winbuild. [#619312]
+
--------------------------------------------------------------------------
goffice 0.8.4:
@@ -28,7 +31,7 @@ Morten:
goffice 0.8.2:
Jean:
- * Support fd:// URIs on win32. [#608422]
+ * Support fd:// URIs on win 32. [#608422]
* Add more GOPath API.
Morten:
diff --git a/goffice/Makefile.am b/goffice/Makefile.am
index 7808005..4a89b56 100644
--- a/goffice/Makefile.am
+++ b/goffice/Makefile.am
@@ -60,12 +60,19 @@ include $(top_srcdir)/goffice.mk
if WITH_WIN32
LIB_PUBLIC_HDRS = $(libgoffice_ GOFFICE_API_VER@_la_HEADERS)
+
+if WITH_GTK
+GTK_DEFS = gtk/local.def drawing/local.def component/local.def \
+ canvas/local.def
+else
+GTK_DEFS =
+endif
+
goffice.def: local.def app/local.def \
- canvas/local.def \
- component/local.def \
- data/local.def drawing/local.def graph/local.def \
- gtk/local.def math/local.def \
- ms-compat/local.def utils/local.def
+ data/local.def graph/local.def \
+ math/local.def \
+ ms-compat/local.def utils/local.def \
+ $(GTK_DEFS)
echo EXPORTS > $@ && \
cat $^ | sort >> $@
diff --git a/goffice/graph/gog-3d-box.c b/goffice/graph/gog-3d-box.c
index 208683f..babf101 100644
--- a/goffice/graph/gog-3d-box.c
+++ b/goffice/graph/gog-3d-box.c
@@ -272,7 +272,9 @@ static void
gog_3d_box_class_init (Gog3DBoxClass *klass)
{
GObjectClass *gobject_klass = (GObjectClass *) klass;
+#ifdef GOFFICE_WITH_GTK
GogObjectClass *gog_klass = (GogObjectClass *) klass;
+#endif
gobject_klass->set_property = gog_3d_box_set_property;
gobject_klass->get_property = gog_3d_box_get_property;
diff --git a/goffice/graph/gog-axis-line.c b/goffice/graph/gog-axis-line.c
index 7e55a51..2e5800c 100644
--- a/goffice/graph/gog-axis-line.c
+++ b/goffice/graph/gog-axis-line.c
@@ -787,6 +787,8 @@ GSF_CLASS_ABSTRACT (GogAxisBase, gog_axis_base,
GOG_TYPE_STYLED_OBJECT);
/************************************************************************/
+#ifdef GOFFICE_WITH_GTK
+
static gboolean gog_axis_base_view_point (GogView *view, double x, double y);
static gboolean
@@ -801,8 +803,6 @@ gog_tool_bound_is_valid_axis (GogView *view)
}
-#ifdef GOFFICE_WITH_GTK
-
static gboolean
gog_tool_select_axis_point (GogView *view, double x, double y, GogObject **gobj)
{
@@ -2083,6 +2083,8 @@ xyz_process (GogAxisBaseAction action, GogView *view, GogViewPadding *padding,
return FALSE;
}
+#ifdef GOFFICE_WITH_GTK
+
static gboolean
gog_axis_base_view_point (GogView *view, double x, double y)
{
@@ -2130,6 +2132,8 @@ gog_axis_base_view_point (GogView *view, double x, double y)
return pointed;
}
+#endif
+
static void
gog_axis_base_view_padding_request (GogView *view, GogViewAllocation const *bbox, GogViewPadding *padding)
{
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index d20d027..1dbc5ed 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -1690,6 +1690,7 @@ gog_axis_calc_ticks (GogAxis *axis)
}
}
+#ifdef GOFFICE_WITH_GTK
static GOFormat *
gog_axis_get_dim_format (GogAxis *axis, unsigned dim)
{
@@ -1700,6 +1701,7 @@ gog_axis_get_dim_format (GogAxis *axis, unsigned dim)
return axis->actual_map_desc->get_dim_format (axis, dim);
}
+#endif
/************************************************************************/
diff --git a/goffice/graph/gog-renderer.c b/goffice/graph/gog-renderer.c
index a12ca32..b63515b 100644
--- a/goffice/graph/gog-renderer.c
+++ b/goffice/graph/gog-renderer.c
@@ -1207,9 +1207,12 @@ gog_renderer_export_image (GogRenderer *rend, GOImageFormat format,
cairo_t *cairo;
cairo_surface_t *surface = NULL;
gboolean status;
- GdkPixbuf *pixbuf, *output_pixbuf;
- double width_in_pts, height_in_pts;
+ 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);
diff --git a/goffice/graph/gog-styled-object.c b/goffice/graph/gog-styled-object.c
index ed72c45..624a1fb 100644
--- a/goffice/graph/gog-styled-object.c
+++ b/goffice/graph/gog-styled-object.c
@@ -129,6 +129,7 @@ gog_styled_object_finalize (GObject *obj)
(*parent_klass->finalize) (obj);
}
+#ifdef GOFFICE_WITH_GTK
static void
styled_object_populate_editor (GogObject *gobj,
GOEditor *editor,
@@ -147,6 +148,7 @@ styled_object_populate_editor (GogObject *gobj,
(GOG_OBJECT_CLASS(parent_klass)->populate_editor) (gobj, editor, dalloc, cc);
}
+#endif
static void
gog_styled_object_parent_changed (GogObject *obj, gboolean was_set)
@@ -189,7 +191,9 @@ gog_styled_object_class_init (GogObjectClass *gog_klass)
gobject_klass->set_property = gog_styled_object_set_property;
gobject_klass->get_property = gog_styled_object_get_property;
gobject_klass->finalize = gog_styled_object_finalize;
+#ifdef GOFFICE_WITH_GTK
gog_klass->populate_editor = styled_object_populate_editor;
+#endif
gog_klass->parent_changed = gog_styled_object_parent_changed;
gog_klass->document_changed = gog_styled_object_document_changed;
style_klass->init_style = gog_styled_object_init_style;
diff --git a/goffice/ms-compat/Makefile.am b/goffice/ms-compat/Makefile.am
index 1f0277c..17bb260 100644
--- a/goffice/ms-compat/Makefile.am
+++ b/goffice/ms-compat/Makefile.am
@@ -1,17 +1,23 @@
noinst_LTLIBRARIES = libgoffice-ms-compat.la
libgoffice_ms_compat_la_SOURCES = \
- god-drawing-ms-client-handler.c \
- god-drawing-ms.c \
- god-image-ms.c \
go-ms-parser.c
+if WITH_GTK
+libgoffice_ms_compat_la_SOURCES += \
+ god-image-ms.c \
+ god-drawing-ms-client-handler.c \
+ god-drawing-ms.c
+endif
libgoffice_ms_compat_ladir = $(goffice_include_dir)/ms-compat
libgoffice_ms_compat_la_HEADERS = \
- god-drawing-ms-client-handler.h \
- god-drawing-ms.h \
- god-image-ms.h \
go-ms-parser.h
+if WITH_GTK
+libgoffice_ms_compat_la_HEADERS += \
+ god-image-ms.h \
+ god-drawing-ms-client-handler.h \
+ god-drawing-ms.h
+endif
include $(top_srcdir)/goffice.mk
diff --git a/goffice/utils/Makefile.am b/goffice/utils/Makefile.am
index 864b14c..4a1f324 100644
--- a/goffice/utils/Makefile.am
+++ b/goffice/utils/Makefile.am
@@ -28,7 +28,7 @@ libgoffice_utils_la_SOURCES = \
go-glib-extras.c \
go-libxml-extras.c \
go-pango-extras.c \
- go-persist.c \
+ go-persist.c \
go-bezier.c \
go-editor.c \
go-style.c \
@@ -58,7 +58,7 @@ libgoffice_utils_la_HEADERS = \
go-glib-extras.h \
go-libxml-extras.h \
go-pango-extras.h \
- go-persist.h \
+ go-persist.h \
go-bezier.h \
go-editor.h \
go-style.h \
diff --git a/goffice/utils/go-style.h b/goffice/utils/go-style.h
index ae84d07..b9b415c 100644
--- a/goffice/utils/go-style.h
+++ b/goffice/utils/go-style.h
@@ -140,6 +140,7 @@ gboolean go_style_is_outline_visible (GOStyle const *style);
gboolean go_style_is_fill_visible (GOStyle const *style);
void go_style_force_auto (GOStyle *style);
+#ifdef GOFFICE_WITH_GTK
void go_style_populate_editor (GOStyle *style,
GOEditor *editor,
GOStyle *default_style,
@@ -150,6 +151,7 @@ gpointer go_style_get_editor (GOStyle *style,
GOStyle *default_style,
GOCmdContext *cc,
GObject *object_with_style);
+#endif
cairo_pattern_t *go_style_create_cairo_pattern (GOStyle const *style,
cairo_t *cr);
diff --git a/plugins/plot_pie/gog-pie.c b/plugins/plot_pie/gog-pie.c
index adc93e9..a9d1425 100644
--- a/plugins/plot_pie/gog-pie.c
+++ b/plugins/plot_pie/gog-pie.c
@@ -358,6 +358,8 @@ GSF_DYNAMIC_CLASS (GogPiePlot, gog_pie_plot,
gog_pie_plot_class_init, gog_pie_plot_init,
GOG_TYPE_PLOT)
+#ifdef GOFFICE_WITH_GTK
+
static void
gog_pie_plot_set_default_separation (GogPiePlot *pie, double separation)
{
@@ -367,6 +369,8 @@ gog_pie_plot_set_default_separation (GogPiePlot *pie, double separation)
gog_object_emit_changed (GOG_OBJECT (pie), FALSE);
}
+#endif
+
/*****************************************************************************/
enum {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]