After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700915 - Port to BlueZ 5
Port to BlueZ 5
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Bluetooth
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-23 18:41 UTC by Emilio Pozuelo Monfort
Modified: 2013-06-13 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bluetooth: use bluetooth_client_remove_device() (2.41 KB, patch)
2013-05-23 21:27 UTC, Gustavo Padovan
rejected Details | Review
bluetooth: switch_connection is always sensitive (1.97 KB, patch)
2013-05-23 21:28 UTC, Gustavo Padovan
reviewed Details | Review
Update adapter interface for BlueZ 5 (1.35 KB, patch)
2013-05-24 11:35 UTC, Emilio Pozuelo Monfort
committed Details | Review
bluetooth: use uuids to set switch_connection sensitiveness (3.01 KB, patch)
2013-06-01 00:58 UTC, Gustavo Padovan
none Details | Review
bluetooth: use uuids to set switch_connection sensitiveness (3.01 KB, patch)
2013-06-01 01:01 UTC, Gustavo Padovan
needs-work Details | Review
bluetooth: make the device discoverable when the panel is running (7.02 KB, patch)
2013-06-01 01:02 UTC, Gustavo Padovan
rejected Details | Review
bluetooth: use uuids to set switch_connection sensitiveness (2.93 KB, patch)
2013-06-05 15:42 UTC, Gustavo Padovan
none Details | Review
bluetooth: use uuids to set switch_connection sensitiveness (2.94 KB, patch)
2013-06-06 18:03 UTC, Gustavo Padovan
needs-work Details | Review
bluetooth: use uuids to set switch_connection sensitiveness (1.98 KB, patch)
2013-06-11 17:34 UTC, Gustavo Padovan
none Details | Review
bluetooth: use uuids to set switch_connection sensitiveness (1.98 KB, patch)
2013-06-11 18:14 UTC, Gustavo Padovan
committed Details | Review

Description Emilio Pozuelo Monfort 2013-05-23 18:41:09 UTC
We need to port the bluetooth panel to BlueZ 5.
Comment 1 Gustavo Padovan 2013-05-23 21:27:29 UTC
Created attachment 245185 [details] [review]
bluetooth: use bluetooth_client_remove_device()

libgnome-bluetooth now has a method to remove a device, we use it here
now to avoid direct access to the BlueZ API.
Comment 2 Gustavo Padovan 2013-05-23 21:28:05 UTC
Created attachment 245186 [details] [review]
bluetooth: switch_connection is always sensitive

    BlueZ now only has and always has a Connect() method on the Device
    interface so we now let the switch connection button always sensitive.
    
    Any profile can be connected through this method.
Comment 3 Bastien Nocera 2013-05-24 10:55:14 UTC
Review of attachment 245185 [details] [review]:

I don't like this because I don't really want device management APIs in libgnome-bluetooth.
Comment 4 Bastien Nocera 2013-05-24 10:56:22 UTC
Review of attachment 245186 [details] [review]:

And what does this do when the device on the other end has no services like audio or input to offer?
Comment 5 Emilio Pozuelo Monfort 2013-05-24 11:35:05 UTC
Created attachment 245229 [details] [review]
Update adapter interface for BlueZ 5

And move it to a define while at it.
Comment 6 Emilio Pozuelo Monfort 2013-05-24 11:35:38 UTC
(In reply to comment #5)
> Created an attachment (id=245229) [details] [review]
> Update adapter interface for BlueZ 5
> 
> And move it to a define while at it.

This is an alternative to the patch that uses new API from libgnome-bluetooth.
Comment 7 Bastien Nocera 2013-05-24 12:17:03 UTC
Review of attachment 245229 [details] [review]:

Looks good.
Comment 8 Gustavo Padovan 2013-06-01 00:58:02 UTC
Created attachment 245798 [details] [review]
 bluetooth: use uuids to set switch_connection sensitiveness

    Since the Services information is now gone, we need to rely on the uuids
    to get the same behaviour.
Comment 9 Gustavo Padovan 2013-06-01 01:01:47 UTC
Created attachment 245800 [details] [review]
bluetooth: use uuids to set switch_connection sensitiveness

    Since the Services information is now gone, we need to rely on the uuids
    to get the same behaviour.
Comment 10 Gustavo Padovan 2013-06-01 01:02:39 UTC
Created attachment 245801 [details] [review]
bluetooth: make the device discoverable when the panel is running

Thus remove the discoverable switch since it is not needed anymore.
Comment 11 Emilio Pozuelo Monfort 2013-06-03 13:36:21 UTC
Comment on attachment 245229 [details] [review]
Update adapter interface for BlueZ 5

Pushed as ac43647ac01cb990555c7b4ff7b8bf5fb8b17b83
Comment 12 Bastien Nocera 2013-06-05 14:19:44 UTC
Review of attachment 245800 [details] [review]:

::: panels/bluetooth/cc-bluetooth-panel.c
@@ +62,3 @@
+	"HandsfreeAudioGateway",
+	"HumanInterfaceDeviceService",
+	NULL,

Remove the NULL here...

@@ +324,3 @@
+	int i;
+
+	for (i = 0; connectable_uuids[i] != NULL; i++) {

...and use G_N_ELEMENTS(connectable_uuids); here

@@ +395,3 @@
 					gtk_widget_show (WID ("send_box"));
+
+				if (gtk_widget_get_sensitive(GTK_WIDGET(button)) == FALSE &&

No need to check sensitive == FALSE, it's not stackable.
Comment 13 Bastien Nocera 2013-06-05 14:20:25 UTC
Review of attachment 245801 [details] [review]:

Marking as rejected as we'll be using the RequestDiscoverable() and ReleaseDiscoverable() API instead.
Comment 14 Gustavo Padovan 2013-06-05 15:42:21 UTC
Created attachment 246093 [details] [review]
bluetooth: use uuids to set switch_connection sensitiveness

    Since the Services information is now gone, we need to rely on the uuids
    to get the same behaviour.
Comment 15 Gustavo Padovan 2013-06-06 18:03:16 UTC
Created attachment 246184 [details] [review]
bluetooth: use uuids to set switch_connection sensitiveness

    Since the Services information is now gone, we need to rely on the uuids
    to get the same behaviour.
Comment 16 Bastien Nocera 2013-06-11 12:56:20 UTC
Review of attachment 246184 [details] [review]:

::: panels/bluetooth/cc-bluetooth-panel.c
@@ +52,3 @@
 #define WIZARD			"bluetooth-wizard"
 
+static const char *connectable_uuids[] = {

As discussed on IRC, I'd rather this list was in libgnome-bluetooth.
Comment 17 Gustavo Padovan 2013-06-11 17:34:45 UTC
Created attachment 246553 [details] [review]
bluetooth: use uuids to set switch_connection sensitiveness

    Since the Services information is now gone, we need to rely on the uuids
    to get the same behaviour.
Comment 18 Gustavo Padovan 2013-06-11 18:14:31 UTC
Created attachment 246558 [details] [review]
bluetooth: use uuids to set switch_connection sensitiveness

Since the Services information is now gone, we need to rely on the uuids
    to get the same behaviour.
Comment 19 Bastien Nocera 2013-06-13 13:09:21 UTC
Review of attachment 246558 [details] [review]:

::: panels/bluetooth/cc-bluetooth-panel.c
@@ +371,3 @@
+
+			gtk_widget_set_sensitive (GTK_WIDGET(button),
+				bluetooth_client_get_connectable(uuids));

indentation, and space before the bracket. Looks fine otherwise.
Comment 20 Bastien Nocera 2013-06-13 13:16:48 UTC
Attachment 246558 [details] pushed as c7b02d7 - bluetooth: use uuids to set switch_connection sensitiveness