[gnome-shell] BluetoothMenu: fix visibility



commit c22264a0ca7795e3a9e71db631270abaca84300f
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Mar 17 16:15:21 2014 +0100

    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

 js/ui/status/bluetooth.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index 67276a7..7fe6635 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -17,6 +17,7 @@ const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
 const RfkillManagerInterface = '<node> \
 <interface name="org.gnome.SettingsDaemon.Rfkill"> \
 <property name="BluetoothAirplaneMode" type="b" access="readwrite" /> \
+<property name="BluetoothHasAirplaneMode" type="b" access="read" /> \
 </interface> \
 </node>';
 
@@ -97,7 +98,7 @@ const Indicator = new Lang.Class({
 
         this.menu.setSensitive(sensitive);
         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)
             this._item.status.text = ngettext("%d Connected Device", "%d Connected Devices", 
nDevices).format(nDevices);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]