[gnome-bluetooth] lib: Make the test app work with gtk-parasite



commit 36041ad5820302b1f000ce6df7b3c31d48b4e22a
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Feb 19 22:04:54 2011 +0000

    lib: Make the test app work with gtk-parasite
    
    By not using gtk_dialog_run()

 lib/test-deviceselection.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/lib/test-deviceselection.c b/lib/test-deviceselection.c
index 632cd3c..00747fe 100644
--- a/lib/test-deviceselection.c
+++ b/lib/test-deviceselection.c
@@ -27,6 +27,7 @@
 #endif
 
 #include <gtk/gtk.h>
+#include <stdlib.h>
 
 #include "bluetooth-chooser.h"
 #include "bluetooth-chooser-button.h"
@@ -185,6 +186,11 @@ response_cb (GtkDialog *dialog, gint response_id, BluetoothChooser *selector)
 	} else {
 		g_message ("No selected device");
 	}
+
+	if (response_id == GTK_RESPONSE_DELETE_EVENT)
+		exit (0);
+
+	gtk_main_quit ();
 }
 
 static GtkWidget *
@@ -388,7 +394,7 @@ int main(int argc, char **argv)
 
 	gtk_widget_show(dialog);
 
-	gtk_dialog_run(GTK_DIALOG(dialog));
+	gtk_main ();
 
 	gtk_widget_destroy(dialog);
 



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