[gnome-shell] network: Use checkConnection to set up the initial connections



commit cdbed0c615e1751b19e5317dc32d234a397e37ce
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Apr 26 18:47:22 2013 -0400

    network: Use checkConnection to set up the initial connections
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700322

 js/ui/status/network.js |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index e449190..aa0f30d 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -180,22 +180,7 @@ const NMConnectionBased = new Lang.Class({
 
     _init: function(connections) {
         this._connections = [ ];
-        for (let i = 0; i < connections.length; i++) {
-            if (!connections[i].get_uuid())
-                continue;
-            if (!this.connectionValid(connections[i]))
-                continue;
-            // record the connection
-            let obj = {
-                connection: connections[i],
-                name: connections[i].get_id(),
-                uuid: connections[i].get_uuid(),
-                timestamp: connections[i]._timestamp,
-                item: null,
-            };
-            this._connections.push(obj);
-        }
-        this._connections.sort(this._connectionSortFunction);
+        connections.forEach(Lang.bind(this, this.checkConnection));
     },
 
     checkConnection: function(connection) {


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