add device selector widget
Subsystems (2)
PATCH 1/1 add device selector widget
It's a first draft of the device selector widget, which I'd like to use in the applet for gnome-vfs obexftp browsing, and in the wizard. Tadas can probably use it for the obex sending program as well.
The test program shows how to use it. The API is dead simple.
I also want to add a "Search" button, to restart a discovery, and combo boxes at the top of it to filter the type/class of device (known, recently used, recently discovered, and printer/phone/etc.).
Big patch, but not really any other way to do it...
Signature · 1 line
Bastien Nocera <[email protected]>
common/Makefile.am +5 -2
@@ -2,7 +2,8 @@ noinst_LIBRARIES = libcommon.a libcommon_a_SOURCES = client.h client.c \ - device-store.h device-store.c + device-store.h device-store.c \ + device-selector.c device-selector.h AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
@@ -13,12 +14,14 @@ nodist_libcommon_a_SOURCES = $(BUILT_SOURCES) CLEANFILES = $(BUILT_SOURCES) -noinst_PROGRAMS = test-client test-agent +noinst_PROGRAMS = test-client test-agent test-deviceselector test_client_LDADD = libcommon.a @GTK_LIBS@ @DBUS_LIBS@ test_agent_LDADD = libcommon.a @DBUS_LIBS@ +test_deviceselector_LDADD = libcommon.a @GTK_LIBS@ @DBUS_LIBS@ + EXTRA_DIST = marshal.list dbus.xml passkey-agent.xml auth-agent.xml MAINTAINERCLEANFILES = Makefile.in
common/device-selector.c new file +294 -0
294 lines not on this page · raw message
common/device-selector.h new file +61 -0
61 lines not on this page · raw message
common/test-deviceselector.c new file +53 -0
53 lines not on this page · raw message
po/POTFILES.in +1 -0
@@ -1,5 +1,6 @@ applet/main.c applet/bluetooth-applet.desktop.in +common/device-selector.c properties/main.c properties/bluetooth-properties.desktop.in wizard/main.c
-------------------------------------------------------------------------
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
Marcel Holtmann
maintainerHi Bastien,
Quoted 11 lines
It's a first draft of the device selector widget, which I'd like to use in the applet for gnome-vfs obexftp browsing, and in the wizard. Tadas can probably use it for the obex sending program as well.
The test program shows how to use it. The API is dead simple.
I also want to add a "Search" button, to restart a discovery, and combo boxes at the top of it to filter the type/class of device (known, recently used, recently discovered, and printer/phone/etc.).
Big patch, but not really any other way to do it...
I really do like it and it is a good idea. However we need to change this a little bit. What we need is multiple things:
BluetoothAdapterChooserWidget
This widget should make it possible to choose an adapter. It can be either a combo box or a tree view depending on some property.
BluetoothAdapterChooserDialog
Uses the BluetoothAdapterChooserWidget and creates a dialog around.
BluetoothDeviceChooserWidget
Will present devices in range. Has a scan button and other possible things to tweak it. And actually we should include maybe a widget to choose the adapter if multiple are available and a property says that is what we want.
BluetoothDeviceChooserDialog
Use the BluetoothDeviceWidget in a dialog and make it useful for simple applications.
Mainly all of these four should be modeled along with the GtkFileChooser stuff and work kinda similar.
Also having some kind of BluetoothDeviceButton that launches a dialog if needed would be nice.
To shorten the widget names. We might better use _not_ the "Chooser" word since it looks like Gtk compat stuff because the other name was already taken by an older widget.
So BluetoothDeviceButton, BluetoothDeviceSelection and BluetoothDeviceSelectionDialog might be appropriate. What do you think?
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
Quoted 14 lines · Marcel Holtmann
Hi Bastien,
Quoted 11 lines
It's a first draft of the device selector widget, which I'd like to use in the applet for gnome-vfs obexftp browsing, and in the wizard. Tadas can probably use it for the obex sending program as well.
The test program shows how to use it. The API is dead simple.
I also want to add a "Search" button, to restart a discovery, and combo boxes at the top of it to filter the type/class of device (known, recently used, recently discovered, and printer/phone/etc.).
Big patch, but not really any other way to do it...
Quoted 7 lines
I really do like it and it is a good idea. However we need to change this a little bit. What we need is multiple things:
BluetoothAdapterChooserWidget
This widget should make it possible to choose an adapter. It can be either a combo box or a tree view depending on some property.
In which cases would this be used?
Quoted 3 lines
BluetoothAdapterChooserDialog
Uses the BluetoothAdapterChooserWidget and creates a dialog around.
Again, which use cases? Also, why would we need a dialogue (see below for the reasoning).
Quoted 6 lines
BluetoothDeviceChooserWidget
Will present devices in range. Has a scan button and other possible things to tweak it. And actually we should include maybe a widget to choose the adapter if multiple are available and a property says that is what we want.
That sounds fair, I already wanted the user to be able to show/hide some of the filter drop-downs, which could/would include the types of devices as mentioned, as well as the adapter on which to work, although I can't think of many cases where we would want to show anything but the default adapter.
Quoted 7 lines
BluetoothDeviceChooserDialog
Use the BluetoothDeviceWidget in a dialog and make it useful for simple applications.
Mainly all of these four should be modeled along with the GtkFileChooser stuff and work kinda similar.
I think it's a bit too much work trying to cater for all the uses one could have of a dialogue, and the amount of code isn't that great to create the widget ourselves (see example in the test selector, or the browse device item).
I think a good selector widget that can be inserted in a dialogue would be better.
Quoted 2 lines
Also having some kind of BluetoothDeviceButton that launches a dialog if needed would be nice.
I have a widget like that in gnome-phone-manager, see the prefs screenshot:
http://live.gnome.org/PhoneManager
It uses libbtctl and gnome-bluetooth widgets right now, but could be ported easily.
Quoted 3 lines
To shorten the widget names. We might better use _not_ the "Chooser" word since it looks like Gtk compat stuff because the other name was already taken by an older widget.
fair enough.
Quoted 2 lines
So BluetoothDeviceButton, BluetoothDeviceSelection and BluetoothDeviceSelectionDialog might be appropriate. What do you think?
I'm not sure about the dialogue widgets, as I said, but the button and the chooser widget would be very useful. Not convinced about the adapter selector either though.
Signature · 12 lines
Bastien Nocera <[email protected]> ------------------------------------------------------------------------- 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
Marcel Holtmann
maintainerHi Bastien,
Quoted 4 lines
Quoted 3 lines
To shorten the widget names. We might better use _not_ the "Chooser" word since it looks like Gtk compat stuff because the other name was already taken by an older widget.
Quoted 8 lines
fair enough.
Quoted 2 lines
So BluetoothDeviceButton, BluetoothDeviceSelection and BluetoothDeviceSelectionDialog might be appropriate. What do you think?
I'm not sure about the dialogue widgets, as I said, but the button and the chooser widget would be very useful. Not convinced about the adapter selector either though.
if we need a dialog for the button anyway, we can even provide it as a widget. Shouldn't be that much work, right? However we can fix the dialog part later on. The widget itself has to come first anyway.
The device selection widget is more important than an adapter selection widget, but I see the need for it since it wraps around D-Bus and allows us not to worry about the details. However there are use cases for the adapter selection. I have at least one when it comes to the Bluetooth Analyzer application and its planned live import support. And on the other hand we have that information inside the model anyway. Only need to export them into a combo box or tree view.
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
Quoted 11 lines · Marcel Holtmann
Hi Bastien,
Quoted 9 lines
Quoted 3 lines
To shorten the widget names. We might better use _not_ the "Chooser" word since it looks like Gtk compat stuff because the other name was already taken by an older widget.
fair enough.
Quoted 2 lines
So BluetoothDeviceButton, BluetoothDeviceSelection and BluetoothDeviceSelectionDialog might be appropriate. What do you think?
Quoted 7 lines
Quoted 3 lines
I'm not sure about the dialogue widgets, as I said, but the button and the chooser widget would be very useful. Not convinced about the adapter selector either though.
if we need a dialog for the button anyway, we can even provide it as a widget. Shouldn't be that much work, right? However we can fix the dialog part later on. The widget itself has to come first anyway.
It's just that the amount of code needed to customise the dialogue for the need of the app (as in "Connect" button, title, selecting which drop-downs to show) would be really close to creating a new dialogue.
I expect most applications to use the button selection widget anyway, and for things like the wizard to use the treeview.
Quoted 7 lines
The device selection widget is more important than an adapter selection widget, but I see the need for it since it wraps around D-Bus and allows us not to worry about the details. However there are use cases for the adapter selection. I have at least one when it comes to the Bluetooth Analyzer application and its planned live import support. And on the other hand we have that information inside the model anyway. Only need to export them into a combo box or tree view.
Ha. Yes, does have its uses. I can certainly hack on something like that.
Here's an updated patch to common/, with the new widget name. I added the bluetooth- to the filenames, as it's the GNOME way to show the whole namespace in the header filename.
I think we'll need some changes to the client for when there's no default adapter (ie. no adapter) and we show the widget, then plug in an adapter. Any ideas how you would want that implemented?
Cheers
Signature · 1 line
Bastien Nocera <[email protected]>
Index: Makefile.am
===================================================================
RCS file: /cvsroot/bluez/gnome/common/Makefile.am,v retrieving revision 1.14
Makefile.am +5 -2
@@ -2,7 +2,8 @@ noinst_LIBRARIES = libcommon.a libcommon_a_SOURCES = client.h client.c \ - device-store.h device-store.c + device-store.h device-store.c \ + bluetooth-device-selection.c bluetooth-device-selection.h AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
@@ -13,12 +14,14 @@ nodist_libcommon_a_SOURCES = $(BUILT_SOU CLEANFILES = $(BUILT_SOURCES) -noinst_PROGRAMS = test-client test-agent +noinst_PROGRAMS = test-client test-agent test-deviceselection test_client_LDADD = libcommon.a @GTK_LIBS@ @DBUS_LIBS@ test_agent_LDADD = libcommon.a @DBUS_LIBS@ +test_deviceselection_LDADD = libcommon.a @GTK_LIBS@ @DBUS_LIBS@ + EXTRA_DIST = marshal.list dbus.xml passkey-agent.xml auth-agent.xml MAINTAINERCLEANFILES = Makefile.in
test-deviceselection.c new file +53 -0
53 lines not on this page · raw message
bluetooth-device-selection.h new file +61 -0
61 lines not on this page · raw message
bluetooth-device-selection.c new file +295 -0
295 lines not on this page · raw message
-------------------------------------------------------------------------
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
Marcel Holtmann
maintainerHi Bastien,
Quoted 3 lines
Here's an updated patch to common/, with the new widget name. I added the bluetooth- to the filenames, as it's the GNOME way to show the whole namespace in the header filename.
the patch is in the CVS now. Thanks.
Quoted 3 lines
I think we'll need some changes to the client for when there's no default adapter (ie. no adapter) and we show the widget, then plug in an adapter. Any ideas how you would want that
If the adapter gets removed we should make the widget insensitive. For me that looks like the only sane way to do it. We can send a signal to inform the user and then they can do whatever they think is right. However any selection itself becomes invalid at that point.
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