[gst-cvs] gst-plugins-base: seek: The new combo box text API is available since 2.23. 0 and 2.91.1

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Oct 21 12:04:40 PDT 2010


Module: gst-plugins-base
Branch: master
Commit: 10c693c696483b77f188abb06fe635b71c7fd120
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=10c693c696483b77f188abb06fe635b71c7fd120

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Wed Oct 20 11:01:59 2010 +0200

seek: The new combo box text API is available since 2.23.0 and 2.91.1

Only use it conditionally.

---

 tests/examples/seek/jsseek.c |    6 ++++++
 tests/examples/seek/seek.c   |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/tests/examples/seek/jsseek.c b/tests/examples/seek/jsseek.c
index 9f89593..e3bbf82 100644
--- a/tests/examples/seek/jsseek.c
+++ b/tests/examples/seek/jsseek.c
@@ -2796,11 +2796,17 @@ 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 64ef022..4204795 100644
--- a/tests/examples/seek/seek.c
+++ b/tests/examples/seek/seek.c
@@ -2741,9 +2741,17 @@ 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