BluetoothMenu: fix visibility
In addition to BluetoothAirplaneMode, we need to check also BluetoothHasAirplaneMode, which is indicative of bluetooth rfkill devices (and by extension bluetooth adapters). This prevents showing the menu if there is no adapter present. https://bugzilla.gnome.org/show_bug.cgi?id=725057
This commit is contained in:
parent
48c3e3f534
commit
c22264a0ca
@ -17,6 +17,7 @@ const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
|
|||||||
const RfkillManagerInterface = '<node> \
|
const RfkillManagerInterface = '<node> \
|
||||||
<interface name="org.gnome.SettingsDaemon.Rfkill"> \
|
<interface name="org.gnome.SettingsDaemon.Rfkill"> \
|
||||||
<property name="BluetoothAirplaneMode" type="b" access="readwrite" /> \
|
<property name="BluetoothAirplaneMode" type="b" access="readwrite" /> \
|
||||||
|
<property name="BluetoothHasAirplaneMode" type="b" access="read" /> \
|
||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ const Indicator = new Lang.Class({
|
|||||||
|
|
||||||
this.menu.setSensitive(sensitive);
|
this.menu.setSensitive(sensitive);
|
||||||
this._indicator.visible = nDevices > 0;
|
this._indicator.visible = nDevices > 0;
|
||||||
this._item.actor.visible = !this._proxy.BluetoothAirplaneMode;
|
this._item.actor.visible = this._proxy.BluetoothHasAirplaneMode && !this._proxy.BluetoothAirplaneMode;
|
||||||
|
|
||||||
if (nDevices > 0)
|
if (nDevices > 0)
|
||||||
this._item.status.text = ngettext("%d Connected Device", "%d Connected Devices", nDevices).format(nDevices);
|
this._item.status.text = ngettext("%d Connected Device", "%d Connected Devices", nDevices).format(nDevices);
|
||||||
|
Loading…
Reference in New Issue
Block a user