[longomatch] test-capture: quit app closing the gtk window
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] test-capture: quit app closing the gtk window
- Date: Mon, 22 Dec 2014 11:46:50 +0000 (UTC)
commit 42a32e8c2491cd31f64fcb539be91b0658f7b66f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Dec 19 15:31:30 2014 +0100
test-capture: quit app closing the gtk window
libcesarplayer/test-capturer.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libcesarplayer/test-capturer.c b/libcesarplayer/test-capturer.c
index 6e7e3df..3ba3e63 100644
--- a/libcesarplayer/test-capturer.c
+++ b/libcesarplayer/test-capturer.c
@@ -47,6 +47,12 @@ stop_clicked (GtkButton * b, GstCameraCapturer * gcc)
}
static void
+on_delete_cb (GtkWidget * video)
+{
+ gtk_main_quit ();
+}
+
+static void
on_realized_cb (GtkWidget * video)
{
GstCameraCapturer *gvc;
@@ -88,6 +94,7 @@ create_window (void)
gtk_box_pack_start (GTK_BOX (hbox), recbutton, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), stopbutton, TRUE, TRUE, 0);
g_signal_connect (video, "realize", G_CALLBACK (on_realized_cb), NULL);
+ g_signal_connect (video, "delete_event", G_CALLBACK (on_delete_cb), NULL);
gtk_widget_show_all (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]