tests: Fix build with GTK+ < 2.17.7
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 27 Jun 2010 08:41:16 +0000 (10:41 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 27 Jun 2010 08:41:16 +0000 (10:41 +0200)
gtk_widget_get_allocation() was added in that version.

tests/examples/camerabin/gst-camera.c
tests/icles/metadata_editor.c

index b47e0cb..6b121fb 100644 (file)
 #include <time.h>
 #include <glib/gstdio.h>        // g_fopen()
 
+#if !GTK_CHECK_VERSION (2, 17, 7)
+static void
+gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
+{
+  *a = w->allocation;
+}
+#endif
+
 /*
  * enums, typedefs and defines
  */
index d17d506..8dae82e 100644 (file)
 
 #include <gst/gst.h>
 
+#if !GTK_CHECK_VERSION (2, 17, 7)
+static void
+gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
+{
+  *a = w->allocation;
+}
+#endif
+
 /*
  * Global constants
  */