[gnome-shell] NetworkMenu: show hardware disabled when rfkill is active



commit 7fa7d04ed0b184702089f6ff65400a28cb6c3b05
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Fri Dec 2 21:50:10 2011 +0100

    NetworkMenu: show hardware disabled when rfkill is active
    
    When wifi or wwan are blocked by hardware killswitch, we should not
    allow changing the switch (it won't work anyway), and show
    "hardware disabled" instead, similar to what we already do in the
    bluetooth menu.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=665194

 js/ui/status/network.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index fa2b8df..e22cdd8 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -249,9 +249,11 @@ const NMWirelessSectionTitleMenuItem = new Lang.Class({
     updateForDevice: function(device) {
         // we show the switch
         // - if there not just one device
-        // - if the switch is off
+        // - if the switch is off (but it can be turned on)
         // - if the device is activated or disconnected
-        if (device && this._softwareEnabled && this._hardwareEnabled) {
+        if (!this._hardwareEnabled) {
+            this.setStatus(_("hardware disabled"));
+        } else if (device && this._softwareEnabled) {
             let text = device.getStatusLabel();
             this.setStatus(text);
         } else



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