[PATCH] Add ability to start wizard from properties

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

 



Hi:

When packaged, generally the Bluetooth properties application is added to the Preferences menu as a configuration tool for Bluetooth.  This leaves a gap in the experience since there is no way to configure "New" devices by following that flow.  This patch adds a button to the UI that will spawn the wizard to allow users to pair.

Regards

Mario Limonciello 
Dell | Linux Engineering 
Mario_Limonciello@xxxxxxxx 
diff -Nur -x '*.orig' -x '*~' bluez-gnome-1.5/properties/main.c bluez-gnome-1.5.new/properties/main.c
--- bluez-gnome-1.5/properties/main.c	2008-08-24 11:05:50.000000000 -0500
+++ bluez-gnome-1.5.new/properties/main.c	2008-09-28 12:19:46.000000000 -0500
@@ -51,6 +51,16 @@
 	gtk_main_quit();
 }
 
+static void wizard_callback(GObject *widget, gpointer user_data)
+{
+        const char *command = "bluetooth-wizard";
+
+        if (!g_spawn_command_line_async(command, NULL))
+                g_printerr("Couldn't execute command: %s\n", command);
+
+	close_callback(widget,user_data);
+}
+
 static GtkWidget *create_window(GtkWidget *notebook)
 {
 	GtkWidget *window;
@@ -76,6 +86,11 @@
 	gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonbox), GTK_BUTTONBOX_END);
 	gtk_box_pack_start(GTK_BOX(vbox), buttonbox, FALSE, FALSE, 0);
 
+	button = gtk_button_new_with_mnemonic(_("Setup _New Device"));
+	gtk_container_add(GTK_CONTAINER(buttonbox), button);
+	g_signal_connect(G_OBJECT(button), "clicked",
+					G_CALLBACK(wizard_callback), window);
+
 	button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
 	gtk_container_add(GTK_CONTAINER(buttonbox), button);
 	g_signal_connect(G_OBJECT(button), "clicked",

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux