[gnome-shell] network: add minimal support for InfiniBand



commit 8a1b83417a43892894564a97868797dc1f90fe64
Author: Dan Winship <danw gnome org>
Date:   Fri Nov 16 11:29:07 2012 -0500

    network: add minimal support for InfiniBand
    
    If present, InfiniBand devices show up with the ethernet devices (and
    the presence of an InfiniBand connection will cause "Wired" to be
    renamed to "Ethernet").
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677150

 js/ui/status/network.js |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index e355415..92f5af5 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -611,12 +611,11 @@ const NMDevice = new Lang.Class({
     }
 });
 
-const NMDeviceWired = new Lang.Class({
-    Name: 'NMDeviceWired',
+const NMDeviceSimple = new Lang.Class({
+    Name: 'NMDeviceSimple',
     Extends: NMDevice,
 
     _init: function(client, device, connections) {
-        this._autoConnectionName = _("Auto Ethernet");
         this.category = NMConnectionCategory.WIRED;
 
         this.parent(client, device, connections);
@@ -631,6 +630,18 @@ const NMDeviceWired = new Lang.Class({
         // 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) {
+        this._autoConnectionName = _("Auto Ethernet");
+        this.category = NMConnectionCategory.WIRED;
+
+        this.parent(client, device, connections);
     },
 
     _createAutomaticConnection: function() {
@@ -1640,6 +1651,7 @@ const NMApplet = new Lang.Class({
         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
@@ -1651,6 +1663,7 @@ const NMApplet = new Lang.Class({
         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;
 
         this._settings = NMClient.RemoteSettings.new(null);



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