public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [PATCH] allow the chooser widget to show search as an afterthought
@ 2007-11-06 16:18 Bastien Nocera
  2007-11-06 18:47 ` [Bluez-devel] Add filters to device selection (was Re: [PATCH] allow the chooser widget to show search as an afterthought) Bastien Nocera
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien Nocera @ 2007-11-06 16:18 UTC (permalink / raw)
  To: BlueZ Hackers

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

Heya,

The current device selection widget doesn't allow to show the search
button after the widget has been created, which is a bit of a pain.

The attached patch shows the search button by default in the test
application and fixes the above problem.

Cheers

[-- Attachment #2: bluez-gnome-allow-showing-search.patch --]
[-- Type: text/x-patch, Size: 2001 bytes --]

Index: bluetooth-device-selection.c
===================================================================
RCS file: /cvsroot/bluez/gnome/common/bluetooth-device-selection.c,v
retrieving revision 1.9
diff -u -p -r1.9 bluetooth-device-selection.c
--- bluetooth-device-selection.c	9 Aug 2007 08:35:19 -0000	1.9
+++ bluetooth-device-selection.c	6 Nov 2007 16:16:12 -0000
@@ -313,11 +313,12 @@ bluetooth_device_selection_init(Bluetoot
 	g_signal_connect (G_OBJECT(priv->search_button), "clicked",
 			  G_CALLBACK(search_button_clicked), self);
 	gtk_box_pack_start (GTK_BOX(box), hbox, FALSE, FALSE, 0);
-	if (priv->show_search == TRUE)
-		gtk_box_pack_start (GTK_BOX(hbox), priv->search_button,
-				    FALSE, FALSE, 0);
+	gtk_widget_show_all (GTK_WIDGET (self));
 
-	gtk_widget_show_all (scrolled);
+	gtk_box_pack_start (GTK_BOX(hbox), priv->search_button,
+			    FALSE, FALSE, 0);
+	if (priv->show_search)
+		gtk_widget_show (priv->search_button);
 
 	bluetooth_device_selection_start_discovery (self);
 }
Index: test-deviceselection.c
===================================================================
RCS file: /cvsroot/bluez/gnome/common/test-deviceselection.c,v
retrieving revision 1.2
diff -u -p -r1.2 test-deviceselection.c
--- test-deviceselection.c	25 Jul 2007 18:01:44 -0000	1.2
+++ test-deviceselection.c	6 Nov 2007 16:16:12 -0000
@@ -61,12 +61,14 @@ int main(int argc, char **argv)
 	gtk_window_set_default_size(GTK_WINDOW(dialog), 400, 300);
 
 	selector = bluetooth_device_selection_new("Select a device to setup");
+	gtk_widget_show(selector);
+	g_object_set(selector, "show-search", TRUE, NULL);
 	g_signal_connect(selector, "selected-device-changed",
 			 G_CALLBACK(select_device_changed), dialog);
 	g_signal_connect(selector, "notify::device-selected",
 			 G_CALLBACK(device_selected_cb), dialog);
 	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), selector);
-	gtk_widget_show_all(dialog);
+	gtk_widget_show(dialog);
 
 	response = gtk_dialog_run(GTK_DIALOG(dialog));
 

[-- Attachment #3: Type: text/plain, Size: 314 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-12-17  1:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-06 16:18 [Bluez-devel] [PATCH] allow the chooser widget to show search as an afterthought Bastien Nocera
2007-11-06 18:47 ` [Bluez-devel] Add filters to device selection (was Re: [PATCH] allow the chooser widget to show search as an afterthought) Bastien Nocera
2007-12-17  1:10   ` Marcel Holtmann
2007-12-17  1:30     ` Bastien Nocera
2007-12-17  1:46       ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox