public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: BlueZ Hackers <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH] Fix sensitivity in the wizard
Date: Thu, 26 Jul 2007 11:08:59 +0100	[thread overview]
Message-ID: <1185444539.3641.278.camel@cookie.hadess.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

- 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.

-- 
Bastien Nocera <hadess@hadess.net> 

[-- Attachment #2: bluez-gnome-fix-selection-sensitivity.patch --]
[-- Type: text/x-patch, Size: 1427 bytes --]

Index: main.c
===================================================================
RCS file: /cvsroot/bluez/gnome/wizard/main.c,v
retrieving revision 1.18
diff -u -p -r1.18 main.c
--- main.c	26 Jul 2007 08:05:40 -0000	1.18
+++ main.c	26 Jul 2007 10:06:21 -0000
@@ -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);

[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2007-07-26 10:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26 10:08 Bastien Nocera [this message]
2007-07-26 11:21 ` [Bluez-devel] [PATCH] Fix sensitivity in the wizard Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1185444539.3641.278.camel@cookie.hadess.net \
    --to=hadess@hadess.net \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox