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 638306 - Bluetooth: Hide icon if there is no bluetooth device
Bluetooth: Hide icon if there is no bluetooth device
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
2.91.x
Other Linux
: Normal minor
: ---
Assigned To: Dan Winship
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-29 22:03 UTC by Johannes Schmid
Modified: 2011-01-06 18:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PopupMenuManager: only navigate visible menus (1.80 KB, patch)
2010-12-30 14:36 UTC, Giovanni Campagna
committed Details | Review
BluetoothStatus: hide the icon when no adapter is present (1.89 KB, patch)
2010-12-30 14:36 UTC, Giovanni Campagna
committed Details | Review

Description Johannes Schmid 2010-12-29 22:03:43 UTC
There is no bluetooth device on my computer and still the bluetooth icon is shown even though you cannot switch it on. The bluetooth icon should be hidden if there is no bluetooth available.

(Don't know if this is a gnome-shell or a gnome-bluetooth issue but with standard panels there is no bluetooth indicator).

F14 + jhbuild on Samsung NC10 (without bluetooth)
Comment 1 Giovanni Campagna 2010-12-30 14:36:03 UTC
Created attachment 177261 [details] [review]
PopupMenuManager: only navigate visible menus

When doing keyboard navigation, ignore menus whose sourceActor is
hidden.
This is needed to hide status icons, as otherwise the menu would
appear despite having no icon.
Comment 2 Giovanni Campagna 2010-12-30 14:36:11 UTC
Created attachment 177262 [details] [review]
BluetoothStatus: hide the icon when no adapter is present

There is no point in showing the bluetooth status, when the required
hardware is missing. Just hide in that case.
Comment 3 Johannes Schmid 2010-12-30 18:27:12 UTC
Tested here and works fine. From a developer perspective the first patch is a good code cleanup :)

Thanks!
Comment 4 Dan Winship 2011-01-05 18:37:07 UTC
Comment on attachment 177262 [details] [review]
BluetoothStatus: hide the icon when no adapter is present

Is _updateKillswitch the right place for this? If I insert/remove a USB bluetooth dongle, will that cause the killswitch-state to change?

If so, then ok to commit.
Comment 5 Giovanni Campagna 2011-01-06 18:58:23 UTC
I'm not a bluetoothd expert, but the addition and removal of dongles should cause ADD/DEL rfkill events, which are captured by libgnome-bluetooth, processed and turned into notify::killswitch-state.
So to me it looks the most sensible place for this kind of code. Also, bluetooth-applet did it in the same way, IIRC.