Skip to contentSkip to conversation

Fix sensitivity in the wizard

PATCH In review Bastien Nocera 2 participants 2 messages Jul 26, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix sensitivity in the wizard

- Go to the device selection page
- Select a device (next button is sensitive)
- Unselect device (using Ctrl+Click) button stays sensitive

I also switched to using the signal instead of the property, removes a bit of code.

Signature · 1 line
Bastien Nocera <[email protected]> 

Index: main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/wizard/main.c,v
retrieving revision 1.18

main.c +4 -9
diff -u -p -r1.18 main.c
@@ -294,13 +294,10 @@ static void create_type(GtkWidget *assis
 	gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
 }
 
-static void select_callback(GObject *object,
-				GParamSpec *spec, gpointer user_data)
+static void select_callback(BluetoothDeviceSelection *sel,
+				gchar *selected, gpointer user_data)
 {
 	GtkAssistant *assistant = user_data;
-	gchar *selected;
-
-	g_object_get(object, "device-selected", &selected, NULL);
 
 	if (selected != NULL) {
 		g_free(address);
@@ -309,9 +306,7 @@ static void select_callback(GObject *obj
 
 		gtk_assistant_set_page_complete(assistant, page_search, TRUE);
 	} else
-		gtk_assistant_set_page_complete(assistant, page_search, TRUE);
-
-	g_free(selected);
+		gtk_assistant_set_page_complete(assistant, page_search, FALSE);
 }
 
 static void create_search(GtkWidget *assistant)
@@ -325,7 +320,7 @@ static void create_search(GtkWidget *ass
 
 	selector = bluetooth_device_selection_new(NULL);
 
-	g_signal_connect(selector, "notify::device-selected",
+	g_signal_connect(selector, "selected-device-changed",
 				G_CALLBACK(select_callback), assistant);
 
 	gtk_container_add(GTK_CONTAINER(vbox), selector);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Bastien,

Quoted 6 lines

- Go to the device selection page
- Select a device (next button is sensitive)
- Unselect device (using Ctrl+Click) button stays sensitive

I also switched to using the signal instead of the property, removes a bit of code.

patch has been applied. Thanks.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel