[glade] Fix compilation by checking for gtk_container_class_set_template_from_string()



commit f51f60bf57e5236f63eef706cb24029e14c00845
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Sun Oct 7 10:38:13 2012 -0300

    Fix compilation by checking for gtk_container_class_set_template_from_string()

 configure.ac                   |    2 +-
 gladeui/glade-widget-adaptor.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9f24230..e98a936 100644
--- a/configure.ac
+++ b/configure.ac
@@ -254,7 +254,7 @@ dnl ================================================================
 dnl Check for extra functions
 dnl ================================================================
 AC_CHECK_FUNCS(gtk_builder_add_from_resource)
-
+AC_CHECK_FUNCS(gtk_container_class_set_template_from_string)
 
 AC_SUBST([GLADE_PREFIX])
 
diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c
index 309c67a..c37798e 100644
--- a/gladeui/glade-widget-adaptor.c
+++ b/gladeui/glade-widget-adaptor.c
@@ -809,7 +809,9 @@ glade_widget_adaptor_set_template (GladeWidgetAdaptor *adaptor,
   /* Update container class template */
   object_type = glade_widget_adaptor_get_object_type (adaptor);
   klass = g_type_class_peek (object_type);
+#if HAVE_GTK_CONTAINER_CLASS_SET_TEMPLATE_FROM_STRING
   gtk_container_class_set_template_from_string (klass, priv->template_xml);
+#endif
   gwa_template_rebuild_objects (adaptor, object_type);
 }
 



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