[gnome-shell/wip/aggregate-menu: 44/69] network: Remove the Wired section



commit d5ede0b4b1ee01c0a2ce4ca26b5047a9f2689108
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 29 15:38:23 2013 -0400

    network: Remove the Wired section
    
    This is a part of the new system status design, see
    https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/
    for design details.
    
    Note that this does have an interesting side effect of not showing
    network connectivity status on wired. This is intentional, and error
    states will still be shown in the top bar when they happen.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704670

 js/ui/status/network.js |   54 -----------------------------------------------
 1 files changed, 0 insertions(+), 54 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 2ba2b0f..eae87b8 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -20,7 +20,6 @@ const Util = imports.misc.util;
 
 const NMConnectionCategory = {
     INVALID: 'invalid',
-    WIRED: 'wired',
     WIRELESS: 'wireless',
     WWAN: 'wwan',
     VPN: 'vpn'
@@ -459,47 +458,6 @@ const NMDevice = new Lang.Class({
 });
 Signals.addSignalMethods(NMDevice.prototype);
 
-const NMDeviceSimple = new Lang.Class({
-    Name: 'NMDeviceSimple',
-    Extends: NMDevice,
-
-    _init: function(client, device, connections) {
-        this.category = NMConnectionCategory.WIRED;
-
-        this.parent(client, device, connections);
-    },
-
-    _createSection: function() {
-        this.parent();
-
-        // if we have only one connection (normal or automatic)
-        // we hide the connection list, and use the switch to control
-        // the device
-        // we can do it here because addConnection and removeConnection
-        // both call _createSection at some point
-        this.section.actor.visible = this._connections.length > 1;
-    }
-});
-
-const NMDeviceWired = new Lang.Class({
-    Name: 'NMDeviceWired',
-    Extends: NMDeviceSimple,
-
-    _init: function(client, device, connections) {
-        device._description = _("Wired");
-        this.category = NMConnectionCategory.WIRED;
-
-        this.parent(client, device, connections);
-    },
-
-    getIndicatorIcon: function() {
-        if (this._device.active_connection.state == NetworkManager.ActiveConnectionState.ACTIVATING)
-            return 'network-wired-acquiring-symbolic';
-        else
-            return 'network-wired-symbolic';
-    },
-});
-
 const NMDeviceModem = new Lang.Class({
     Name: 'NMDeviceModem',
     Extends: NMDevice,
@@ -1273,23 +1231,17 @@ const NMApplet = new Lang.Class({
 
         // Device types
         this._dtypes = { };
-        this._dtypes[NetworkManager.DeviceType.ETHERNET] = NMDeviceWired;
         this._dtypes[NetworkManager.DeviceType.WIFI] = NMDeviceWireless;
         this._dtypes[NetworkManager.DeviceType.MODEM] = NMDeviceModem;
         this._dtypes[NetworkManager.DeviceType.BT] = NMDeviceBluetooth;
-        this._dtypes[NetworkManager.DeviceType.INFINIBAND] = NMDeviceSimple;
         // TODO: WiMax support
 
         // Connection types
         this._ctypes = { };
         this._ctypes[NetworkManager.SETTING_WIRELESS_SETTING_NAME] = NMConnectionCategory.WIRELESS;
-        this._ctypes[NetworkManager.SETTING_WIRED_SETTING_NAME] = NMConnectionCategory.WIRED;
-        this._ctypes[NetworkManager.SETTING_PPPOE_SETTING_NAME] = NMConnectionCategory.WIRED;
-        this._ctypes[NetworkManager.SETTING_PPP_SETTING_NAME] = NMConnectionCategory.WIRED;
         this._ctypes[NetworkManager.SETTING_BLUETOOTH_SETTING_NAME] = NMConnectionCategory.WWAN;
         this._ctypes[NetworkManager.SETTING_CDMA_SETTING_NAME] = NMConnectionCategory.WWAN;
         this._ctypes[NetworkManager.SETTING_GSM_SETTING_NAME] = NMConnectionCategory.WWAN;
-        this._ctypes[NetworkManager.SETTING_INFINIBAND_SETTING_NAME] = NMConnectionCategory.WIRED;
         this._ctypes[NetworkManager.SETTING_VPN_SETTING_NAME] = NMConnectionCategory.VPN;
 
         NMClient.Client.new_async(null, Lang.bind(this, this._clientGot));
@@ -1324,12 +1276,6 @@ const NMApplet = new Lang.Class({
         this._section = new PopupMenu.PopupMenuSection();
         this.menu.addMenuItem(this._section);
 
-        this._devices.wired = {
-            section: new PopupMenu.PopupMenuSection(),
-            devices: [ ],
-        };
-        this._section.addMenuItem(this._devices.wired.section);
-
         this._devices.wireless = {
             section: new PopupMenu.PopupMenuSection(),
             devices: [ ],


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