From 8a7f93596992000942cdc1337f45ee3197376351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Fri, 18 Feb 2022 21:02:20 +0100 Subject: [PATCH] status/bluetooth: Show bluetooth-disabled icon when disabled We have an icon for this, so let's actually use it. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2186 Part-of: --- js/ui/status/bluetooth.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index d84bc3ad5..39c2ab62c 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -41,7 +41,6 @@ class Indicator extends PanelMenu.SystemIndicator { this._proxy.connect('g-properties-changed', this._queueSync.bind(this)); this._item = new PopupMenu.PopupSubMenuMenuItem(_("Bluetooth"), true); - this._item.icon.icon_name = 'bluetooth-active-symbolic'; this._toggleItem = new PopupMenu.PopupMenuItem(''); this._toggleItem.connect('activate', () => { @@ -159,6 +158,9 @@ class Indicator extends PanelMenu.SystemIndicator { else this._item.visible = adapterPowered; + this._item.icon.icon_name = adapterPowered + ? 'bluetooth-active-symbolic' : 'bluetooth-disabled-symbolic'; + if (nConnectedDevices > 1) /* Translators: this is the number of connected bluetooth devices */ this._item.label.text = ngettext('%d Connected', '%d Connected', nConnectedDevices).format(nConnectedDevices);