[gnome-shell] network: more NM 0.9.6 compatibility



commit a34d4d91244877bbdbbb15e2f2c6fc14173b34cd
Author: Dan Winship <danw gnome org>
Date:   Mon Jan 21 14:25:21 2013 -0500

    network: more NM 0.9.6 compatibility
    
    Virtual device support requires
    NMGtk.utils_get_connection_device_name(), so don't try to support
    virtual devices with older NM.

 js/ui/status/network.js |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 73f5fc8..ce1e7e4 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1735,9 +1735,11 @@ const NMApplet = new Lang.Class({
 
         // Virtual device types
         this._vtypes = { };
-        this._vtypes[NetworkManager.SETTING_VLAN_SETTING_NAME] = NMDeviceVirtual;
-        this._vtypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMDeviceVirtual;
-        this._vtypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMDeviceVirtual;
+        if (NMGtk) {
+            this._vtypes[NetworkManager.SETTING_VLAN_SETTING_NAME] = NMDeviceVirtual;
+            this._vtypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMDeviceVirtual;
+            this._vtypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMDeviceVirtual;
+        }
 
         // Connection types
         this._ctypes = { };
@@ -1749,9 +1751,11 @@ const NMApplet = new Lang.Class({
         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_VLAN_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
-        this._ctypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
-        this._ctypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
+        if (NMGtk) {
+            this._ctypes[NetworkManager.SETTING_VLAN_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
+            this._ctypes[NetworkManager.SETTING_BOND_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
+            this._ctypes[NetworkManager.SETTING_BRIDGE_SETTING_NAME] = NMConnectionCategory.VIRTUAL;
+        }
         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]