From: Bastien Nocera <hadess@hadess.net>
To: BlueZ Hackers <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH] allow the chooser widget to show search as an afterthought
Date: Tue, 06 Nov 2007 16:18:45 +0000 [thread overview]
Message-ID: <1194365925.15726.19.camel@cookie.hadess.net> (raw)
[-- 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
next reply other threads:[~2007-11-06 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 16:18 Bastien Nocera [this message]
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
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=1194365925.15726.19.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