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 719341 - Stop using gnome-bluetooth-applet
Stop using gnome-bluetooth-applet
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: system-status
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 672782 (view as bug list)
Depends on: 719339
Blocks: 719358
 
 
Reported: 2013-11-26 10:11 UTC by Bastien Nocera
Modified: 2013-11-30 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bluetooth: Remove pairing agent (9.12 KB, patch)
2013-11-26 14:12 UTC, Bastien Nocera
reviewed Details | Review
bluetooth: Use g-s-d to turn off Bluetooth (2.45 KB, patch)
2013-11-26 14:12 UTC, Bastien Nocera
reviewed Details | Review
bluetooth: Use BluetoothClient to detect connected devices (1.84 KB, patch)
2013-11-26 14:12 UTC, Bastien Nocera
accepted-commit_now Details | Review
bluetooth: Remove GnomeBluetoothApplet hacks (6.94 KB, patch)
2013-11-26 14:12 UTC, Bastien Nocera
committed Details | Review
bluetooth: Remove pairing agent (8.85 KB, patch)
2013-11-26 14:15 UTC, Bastien Nocera
committed Details | Review
bluetooth: Use g-s-d to turn off Bluetooth (2.70 KB, patch)
2013-11-26 16:51 UTC, Bastien Nocera
committed Details | Review
bluetooth: Use BluetoothClient to detect connected devices (2.36 KB, patch)
2013-11-26 16:51 UTC, Bastien Nocera
reviewed Details | Review
bluetooth: Use BluetoothClient to detect connected devices (2.56 KB, patch)
2013-11-26 17:29 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2013-11-26 10:11:55 UTC
The Bluetooth part of the system status has shrunk in 3.10, and Bluetooth support is now built on top of BlueZ 5, so that it might not make sense to use a helper anymore.

1. Killswitch support would use the Bluetooth rfkill support in gnome-settings-daemon (bug 719339)
2. Authorisation support (notifications) would be removed so that only the Bluetooth panel handles those.
3. The number of connected devices can be gathered through the properties of each device listed in the BlueZ ObjectManager for devices.
Comment 1 Bastien Nocera 2013-11-26 14:12:33 UTC
Created attachment 262857 [details] [review]
bluetooth: Remove pairing agent

We'll only have it in the Bluetooth settings panel.
Comment 2 Bastien Nocera 2013-11-26 14:12:39 UTC
Created attachment 262858 [details] [review]
bluetooth: Use g-s-d to turn off Bluetooth
Comment 3 Bastien Nocera 2013-11-26 14:12:44 UTC
Created attachment 262859 [details] [review]
bluetooth: Use BluetoothClient to detect connected devices

Instead of the GnomeBluetoothApplet helper.
Comment 4 Bastien Nocera 2013-11-26 14:12:50 UTC
Created attachment 262860 [details] [review]
bluetooth: Remove GnomeBluetoothApplet hacks
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-11-26 14:13:47 UTC
Review of attachment 262860 [details] [review]:

OK.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-11-26 14:14:12 UTC
Review of attachment 262857 [details] [review]:

Looks OK, minus the change to gvc.
Comment 7 Bastien Nocera 2013-11-26 14:15:57 UTC
Created attachment 262861 [details] [review]
bluetooth: Remove pairing agent

We'll only have it in the Bluetooth settings panel.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-11-26 14:16:04 UTC
Review of attachment 262858 [details] [review]:

::: js/ui/status/bluetooth.js
@@ +37,3 @@
+                                             Lang.bind(this, function(proxy, error) {
+                                                 if (error) {
+                                                     log(error.message);

logError(error, "Could not connect to RFKill");
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-11-26 14:16:21 UTC
Review of attachment 262861 [details] [review]:

Yep.
Comment 10 Bastien Nocera 2013-11-26 14:17:38 UTC
(In reply to comment #8)
> Review of attachment 262858 [details] [review]:
> 
> ::: js/ui/status/bluetooth.js
> @@ +37,3 @@
> +                                             Lang.bind(this, function(proxy,
> error) {
> +                                                 if (error) {
> +                                                     log(error.message);
> 
> logError(error, "Could not connect to RFKill");

It's the same code as in rfkill.js, should we change it there as well?
Comment 11 Jasper St. Pierre (not reading bugmail) 2013-11-26 14:17:50 UTC
Review of attachment 262859 [details] [review]:

Ugh. I'm not so happy about using a GtkTreeModel from unrelated bluetooth code, but I suppose that's the library's problem, not ours.
Comment 12 Jasper St. Pierre (not reading bugmail) 2013-11-26 14:18:34 UTC
(In reply to comment #10)
> > logError(error, "Could not connect to RFKill");
> 
> It's the same code as in rfkill.js, should we change it there as well?

Land this as-is, then, and I'll do a followup to change it in both places.
Comment 13 Bastien Nocera 2013-11-26 16:51:12 UTC
Created attachment 262880 [details] [review]
bluetooth: Use g-s-d to turn off Bluetooth
Comment 14 Bastien Nocera 2013-11-26 16:51:28 UTC
Created attachment 262881 [details] [review]
bluetooth: Use BluetoothClient to detect connected devices

Instead of the GnomeBluetoothApplet helper.
Comment 15 Bastien Nocera 2013-11-26 16:52:34 UTC
Comment on attachment 262880 [details] [review]
bluetooth: Use g-s-d to turn off Bluetooth

Just a single missing imports, so marking as acn as the original patch.
Comment 16 Jasper St. Pierre (not reading bugmail) 2013-11-26 16:59:12 UTC
Review of attachment 262881 [details] [review]:

::: js/ui/status/bluetooth.js
@@ +64,3 @@
+        let [ret, iter] = this._model.get_iter_first();
+        let nDevices = 0;
+        while (ret) {

I think this would be easier to read split into two methods: _getNConnectedDevices, and _getDefaultAdapter:


    _getDefaultAdapter: function() {
        let [ret, iter] = this._model.get_iter_first();
        while (ret) {
            let isDefault = this._model.get_value(iter, GnomeBluetooth.Column.DEFAULT);
            if (isDefault)
                return iter;
            ret = this._model.iter_next(iter);
        }
        return iter;
    },

    _getNConnectedDevices: function() {
        let adapter = this._getDefaultAdapter();
        if (!adapter)
            return 0;

        let nDevices = 0;
        let [ret, iter] = this._model.iter_children(adapter);
        while (ret) {
            let isConnected = this._model.get_value(iter, GnomeBluetooth.Column.CONNECTED);
            if (isConnected)
                nDevices++;
            ret = this._model.iter_next(iter);
        }
        return nDevices;
    },
Comment 17 Bastien Nocera 2013-11-26 17:29:39 UTC
Created attachment 262885 [details] [review]
bluetooth: Use BluetoothClient to detect connected devices

Instead of the GnomeBluetoothApplet helper.
Comment 18 Jasper St. Pierre (not reading bugmail) 2013-11-26 17:48:13 UTC
Review of attachment 262885 [details] [review]:

Looks good.
Comment 19 Bastien Nocera 2013-11-26 17:53:57 UTC
Attachment 262860 [details] pushed as ebc15e6 - bluetooth: Remove GnomeBluetoothApplet hacks
Attachment 262861 [details] pushed as abf7c33 - bluetooth: Remove pairing agent
Attachment 262880 [details] pushed as 981a536 - bluetooth: Use g-s-d to turn off Bluetooth
Attachment 262885 [details] pushed as 85f2d94 - bluetooth: Use BluetoothClient to detect connected devices
Comment 20 Bastien Nocera 2013-11-30 13:10:00 UTC
*** Bug 672782 has been marked as a duplicate of this bug. ***