network: Use checkConnection to set up the initial connections
https://bugzilla.gnome.org/show_bug.cgi?id=700322
This commit is contained in:
parent
f6e7034172
commit
cdbed0c615
@ -180,22 +180,7 @@ const NMConnectionBased = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(connections) {
|
_init: function(connections) {
|
||||||
this._connections = [ ];
|
this._connections = [ ];
|
||||||
for (let i = 0; i < connections.length; i++) {
|
connections.forEach(Lang.bind(this, this.checkConnection));
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
checkConnection: function(connection) {
|
checkConnection: function(connection) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user