GNOME Bugzilla – Bug 638306
Bluetooth: Hide icon if there is no bluetooth device
Last modified: 2011-01-06 18:58:44 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)
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.
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.
Tested here and works fine. From a developer perspective the first patch is a good code cleanup :) Thanks!
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.
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.