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 691764 - Disable Bluetooth sharing with no Bluetooth
Disable Bluetooth sharing with no Bluetooth
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Sharing
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-15 07:46 UTC by Bastien Nocera
Modified: 2013-01-28 18:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sharing: hide the bluetooth sharing when there is no bluetooth adapter (4.08 KB, patch)
2013-01-18 17:00 UTC, Thomas Wood
needs-work Details | Review
sharing: hide the bluetooth sharing when there is no bluetooth adapter (3.64 KB, patch)
2013-01-24 16:41 UTC, Thomas Wood
reviewed Details | Review

Description Bastien Nocera 2013-01-15 07:46:03 UTC
Currently doesn't check that there is Bluetooth available.

It should also be disabled if gnome-bluetooth isn't available.

See the "default-adapter" and "default-adapter-powered" properties of BluetoothClient;
http://developer.gnome.org/gnome-bluetooth/stable/BluetoothClient.html#BluetoothClient--default-adapter
Comment 1 Thomas Wood 2013-01-18 17:00:35 UTC
Created attachment 233773 [details] [review]
sharing: hide the bluetooth sharing when there is no bluetooth adapter
Comment 2 Bastien Nocera 2013-01-23 10:05:32 UTC
Review of attachment 233773 [details] [review]:

::: panels/sharing/cc-sharing-panel.c
@@ +300,3 @@
+
+  if (killswitch_state == BLUETOOTH_KILLSWITCH_STATE_NO_ADAPTER
+      && !bluetooth_adapter)

You can't have an adapter without a Bluetooth killswitch. It's a soft killswitch, but it's attached to every Bluetooth adapter.

See the "rfkill" output (available at: http://git.sipsolutions.net/?p=rfkill.git)
Comment 3 Thomas Wood 2013-01-24 16:41:23 UTC
Created attachment 234314 [details] [review]
sharing: hide the bluetooth sharing when there is no bluetooth adapter
Comment 4 Bastien Nocera 2013-01-28 17:19:28 UTC
Review of attachment 234314 [details] [review]:

::: panels/sharing/cc-sharing-panel.c
@@ +311,3 @@
+#ifdef HAVE_BLUETOOTH
+
+  priv->bluetooth_killswitch = bluetooth_killswitch_new ();

As mentioned on IRC, you should check the state here before connecting to the signal.
Comment 5 Thomas Wood 2013-01-28 18:00:36 UTC
Modified version of the patch, which also gets the initial state, pushed as dbcffa5.