[gnome-control-center] wacom: Make closing the test app work



commit 9caefabf2d59c499344fd730590fc3ba1538ddc3
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 10 14:27:43 2012 +0000

    wacom: Make closing the test app work

 panels/wacom/test-wacom.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/panels/wacom/test-wacom.c b/panels/wacom/test-wacom.c
index 2743ad6..8bd029e 100644
--- a/panels/wacom/test-wacom.c
+++ b/panels/wacom/test-wacom.c
@@ -33,6 +33,16 @@ add_page (GList *devices,
 	gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, NULL);
 }
 
+static gboolean
+delete_event_cb (GtkWidget *widget,
+		 GdkEvent  *event,
+		 gpointer   user_data)
+{
+	gtk_main_quit ();
+
+	return FALSE;
+}
+
 int main (int argc, char **argv)
 {
 	GtkWidget *window, *notebook;
@@ -41,6 +51,8 @@ int main (int argc, char **argv)
 	gtk_init (&argc, &argv);
 
 	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+	g_signal_connect (G_OBJECT (window), "delete-event",
+			  G_CALLBACK (delete_event_cb), NULL);
 	notebook = gtk_notebook_new ();
 	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
 	gtk_widget_set_vexpand (notebook, TRUE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]