[gnome-shell] NetworkMenu: use Connected instead of profile name for wired and wwan



commit 3432f715008ca9577daa9bb6297a3430a360002c
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Mar 4 14:02:00 2014 +0100

    NetworkMenu: use Connected instead of profile name for wired and wwan
    
    The profile name is most often not useful (because it's an
    autogenerated string like "Wired Connection 1"), and even when it
    is, it's already available in the submenu.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725586

 js/ui/status/network.js |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 32e177e..b159e3c 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -236,16 +236,6 @@ const NMConnectionSection = new Lang.Class({
         return this.getIndicatorIcon();
     },
 
-    _getStatus: function() {
-        let values = this._connectionItems.values();
-        for (let item of values) {
-            if (item.isActive())
-                return item.getName();
-        }
-
-        return _("Off");
-    },
-
     getConnectLabel: function() {
         return _("Connect");
     },
@@ -424,7 +414,7 @@ const NMConnectionDevice = new Lang.Class({
         case NetworkManager.DeviceState.DISCONNECTED:
             return _("Off");
         case NetworkManager.DeviceState.ACTIVATED:
-            return this.parent();
+            return _("Connected");
         case NetworkManager.DeviceState.UNMANAGED:
             /* Translators: this is for network devices that are physically present but are not
                under NetworkManager's control (and thus cannot be used in the menu) */
@@ -1455,6 +1445,16 @@ const NMVPNSection = new Lang.Class({
         return _("VPN");
     },
 
+    _getStatus: function() {
+        let values = this._connectionItems.values();
+        for (let item of values) {
+            if (item.isActive())
+                return item.getName();
+        }
+
+        return _("Off");
+    },
+
     _getMenuIcon: function() {
         return this.getIndicatorIcon() || 'network-vpn-symbolic';
     },


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