[goffice] Compilation: avoid gtk 3.4 dependency.



commit 91132a5f439c96504a15bb60a4958325ab4e8fa6
Author: Morten Welinder <terra gnome org>
Date:   Mon Mar 25 16:20:43 2013 -0400

    Compilation: avoid gtk 3.4 dependency.

 ChangeLog                 |    5 +++++
 configure.ac              |    1 +
 goffice/canvas/goc-item.c |    2 ++
 3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4f4e3d6..70b47bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-25  Morten Welinder  <terra gnome org>
+
+       * goffice/canvas/goc-item.c (goc_item_get_style_context): Avoid
+       3.4 dependency.
+
 2013-03-25  Jean Brefort  <jean brefort normalesup org>
 
        * plugins/plot_barcol/gog-dropbar.c (gog_dropbar_view_render): one more
diff --git a/configure.ac b/configure.ac
index d706e92..b9ef2f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -546,6 +546,7 @@ CFLAGS="$CFLAGS $GOFFICE_CFLAGS"
 LIBS="$GOFFICE_LIBS $LIBS"
 AC_CHECK_FUNCS(gsf_odf_out_get_version)
 AC_CHECK_FUNCS(gdk_event_get_scroll_deltas)
+AC_CHECK_FUNCS(gtk_style_context_set_parent)
 CFLAGS=$SAVE_CFLAGS
 LIBS=$SAVE_LIBS
 
diff --git a/goffice/canvas/goc-item.c b/goffice/canvas/goc-item.c
index 129fa7d..d480bad 100644
--- a/goffice/canvas/goc-item.c
+++ b/goffice/canvas/goc-item.c
@@ -865,8 +865,10 @@ goc_item_get_style_context (const GocItem *item)
 
                context = gtk_style_context_new ();
                gtk_style_context_set_path (context, path);
+#ifdef HAVE_GTK_STYLE_CONTEXT_SET_PARENT
                gtk_style_context_set_parent (context,
                                              gtk_widget_get_style_context (GTK_WIDGET (item->canvas)));
+#endif
 
                g_object_set_qdata_full (G_OBJECT (item),
                                         quark_style_context,


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