[gst-cvs] gst-plugins-base: seek: Define the new combobox API to the old functions if using older GTK
Tim Müller
tpm at kemper.freedesktop.org
Sat Oct 30 08:09:38 PDT 2010
Module: gst-plugins-base
Branch: master
Commit: 9f9e5f80aa15c62b211a31142f7a2f22aa03c0e9
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=9f9e5f80aa15c62b211a31142f7a2f22aa03c0e9
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Thu Oct 28 15:13:45 2010 +0200
seek: Define the new combobox API to the old functions if using older GTK
https://bugzilla.gnome.org/show_bug.cgi?id=632653
---
tests/examples/seek/jsseek.c | 13 +++++++------
tests/examples/seek/seek.c | 13 +++++++------
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/tests/examples/seek/jsseek.c b/tests/examples/seek/jsseek.c
index e3bbf82..1de9f13 100644
--- a/tests/examples/seek/jsseek.c
+++ b/tests/examples/seek/jsseek.c
@@ -50,6 +50,13 @@
GST_DEBUG_CATEGORY_STATIC (seek_debug);
#define GST_CAT_DEFAULT (seek_debug)
+#if (!GTK_CHECK_VERSION(2, 23, 0) || GTK_CHECK_VERSION(2, 90, 0)) && !GTK_CHECK_VERSION(2, 91, 1)
+#define gtk_combo_box_text_new gtk_combo_box_new_text
+#define gtk_combo_box_text_append_text gtk_combo_box_append_text
+#define gtk_combo_box_text_remove gtk_combo_box_remove_text
+#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
+#endif
+
#if !GTK_CHECK_VERSION (2, 17, 7)
static void
gtk_widget_get_allocation (GtkWidget * w, GtkAllocation * a)
@@ -2796,17 +2803,11 @@ main (int argc, char **argv)
step = gtk_expander_new ("step options");
hbox = gtk_hbox_new (FALSE, 0);
-#if (GTK_CHECK_VERSION(2, 23, 0) && !GTK_CHECK_VERSION(2, 90, 0)) || GTK_CHECK_VERSION(2, 91, 1)
format_combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (format_combo),
"frames");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (format_combo),
"time (ms)");
-#else
- format_combo = gtk_combo_box_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (format_combo), "frames");
- gtk_combo_box_append_text (GTK_COMBO_BOX (format_combo), "time (ms)");
-#endif
gtk_combo_box_set_active (GTK_COMBO_BOX (format_combo), 0);
gtk_box_pack_start (GTK_BOX (hbox), format_combo, FALSE, FALSE, 2);
diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c
index 4204795..6c16cf9 100644
--- a/tests/examples/seek/seek.c
+++ b/tests/examples/seek/seek.c
@@ -37,6 +37,13 @@
#endif
#include <gst/interfaces/xoverlay.h>
+#if (!GTK_CHECK_VERSION(2, 23, 0) || GTK_CHECK_VERSION(2, 90, 0)) && !GTK_CHECK_VERSION(2, 91, 1)
+#define gtk_combo_box_text_new gtk_combo_box_new_text
+#define gtk_combo_box_text_append_text gtk_combo_box_append_text
+#define gtk_combo_box_text_remove gtk_combo_box_remove_text
+#define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
+#endif
+
GST_DEBUG_CATEGORY_STATIC (seek_debug);
#define GST_CAT_DEFAULT (seek_debug)
@@ -2741,17 +2748,11 @@ main (int argc, char **argv)
step = gtk_expander_new ("step options");
hbox = gtk_hbox_new (FALSE, 0);
-#if (GTK_CHECK_VERSION(2, 23, 0) && !GTK_CHECK_VERSION(2, 90, 0)) || GTK_CHECK_VERSION(2, 91, 1)
format_combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (format_combo),
"frames");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (format_combo),
"time (ms)");
-#else
- format_combo = gtk_combo_box_new_text ();
- gtk_combo_box_append_text (GTK_COMBO_BOX (format_combo), "frames");
- gtk_combo_box_append_text (GTK_COMBO_BOX (format_combo), "time (ms)");
-#endif
gtk_combo_box_set_active (GTK_COMBO_BOX (format_combo), 0);
gtk_box_pack_start (GTK_BOX (hbox), format_combo, FALSE, FALSE, 2);
More information about the Gstreamer-commits
mailing list