diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2015-04-27 15:41:04 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-04-27 21:14:09 -0300 |
commit | a1a58d438f005bcecc533babc0f4e296ce892e89 (patch) | |
tree | 8441940f863a9c371cc9f704e11e048fd9d5f92e /tests | |
parent | 2690cd33ce463029c74eaee1fcc43d6b0158eaaf (diff) | |
download | gstreamer-plugins-bad-a1a58d438f005bcecc533babc0f4e296ce892e89.tar.gz |
examples: gst-camera: update to GTK3
When opening the .ui file it complains about being for GTK 2 and
automatically updates it to GTK3. Commit this version and update
the makefile
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examples/camerabin2/Makefile.am | 6 | ||||
-rw-r--r-- | tests/examples/camerabin2/gst-camera2.c | 11 | ||||
-rw-r--r-- | tests/examples/camerabin2/gst-camera2.ui | 9 |
3 files changed, 7 insertions, 19 deletions
diff --git a/tests/examples/camerabin2/Makefile.am b/tests/examples/camerabin2/Makefile.am index d29e6792b..56f5769a6 100644 --- a/tests/examples/camerabin2/Makefile.am +++ b/tests/examples/camerabin2/Makefile.am @@ -2,7 +2,7 @@ GST_CAMERABIN_UI_FILES = gst-camera2.ui AM_CPPFLAGS = -DCAMERA_APPS_UIDIR=\""$(srcdir)"\" -if HAVE_GTK +if HAVE_GTK3 GST_CAMERABIN_GTK_EXAMPLES = gst-camera2 @@ -10,7 +10,7 @@ gst_camera2_SOURCES = gst-camera2.h gst-camera2.c gst_camera2_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \ - $(GTK_CFLAGS) \ + $(GTK3_CFLAGS) \ $(GMODULE_EXPORT_CFLAGS) \ -DGST_USE_UNSTABLE_API gst_camera2_LDADD = \ @@ -21,7 +21,7 @@ gst_camera2_LDADD = \ -lgstpbutils-@GST_API_VERSION@ \ -lgstvideo-@GST_API_VERSION@ \ $(GST_LIBS) \ - $(GTK_LIBS) \ + $(GTK3_LIBS) \ $(GMODULE_EXPORT_LIBS) noinst_DATA = $(GST_CAMERABIN_UI_FILES) diff --git a/tests/examples/camerabin2/gst-camera2.c b/tests/examples/camerabin2/gst-camera2.c index 0bb986930..0b656a54c 100644 --- a/tests/examples/camerabin2/gst-camera2.c +++ b/tests/examples/camerabin2/gst-camera2.c @@ -170,9 +170,7 @@ on_videoRButton_toggled (GtkToggleButton * button, gpointer user_data) void on_viewfinderArea_realize (GtkWidget * widget, gpointer data) { -#if GTK_CHECK_VERSION (2, 18, 0) gdk_window_ensure_native (gtk_widget_get_window (widget)); -#endif } void @@ -219,11 +217,7 @@ bus_sync_callback (GstBus * bus, GstMessage * message, gpointer data) /* FIXME: make sure to get XID in main thread */ ui_drawing = GTK_WIDGET (gtk_builder_get_object (builder, "viewfinderArea")); gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (message->src), -#if GTK_CHECK_VERSION (2, 91, 6) GDK_WINDOW_XID (gtk_widget_get_window (ui_drawing))); -#else - GDK_WINDOW_XWINDOW (gtk_widget_get_window (ui_drawing))); -#endif gst_message_unref (message); return GST_BUS_DROP; @@ -276,7 +270,6 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) static gboolean init_gtkwidgets_data (void) { -#if GTK_CHECK_VERSION(2,24,0) gint i; GtkComboBoxText *combobox = GTK_COMBO_BOX_TEXT (gtk_builder_get_object (builder, "formatComboBox")); @@ -291,10 +284,6 @@ init_gtkwidgets_data (void) /* default to the first one -> ogg */ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); return TRUE; -#else - g_warning ("This needs a newer version of GTK (2.24 at least)"); - return FALSE; -#endif } int diff --git a/tests/examples/camerabin2/gst-camera2.ui b/tests/examples/camerabin2/gst-camera2.ui index 9dc1fee3d..3e1cd4ea3 100644 --- a/tests/examples/camerabin2/gst-camera2.ui +++ b/tests/examples/camerabin2/gst-camera2.ui @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.18.3 --> <interface> - <requires lib="gtk+" version="2.16"/> + <requires lib="gtk+" version="3.0"/> <object class="GtkWindow" id="mainWindow"> <property name="can_focus">False</property> <property name="default_width">800</property> @@ -21,7 +22,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> + <property name="xalign">0.5</property> <property name="active">True</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_imageRButton_toggled" swapped="no"/> @@ -39,7 +40,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> + <property name="xalign">0.5</property> <property name="active">True</property> <property name="draw_indicator">True</property> <property name="group">imageRButton</property> @@ -97,7 +98,6 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <signal name="clicked" handler="on_captureButton_clicked" swapped="no"/> </object> <packing> @@ -113,7 +113,6 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="use_action_appearance">False</property> <signal name="clicked" handler="on_stopCaptureButton_clicked" swapped="no"/> </object> <packing> |