[gnome-shell/wip/message-tray-menu: 97/109] network: Use checkConnection to set up the initial connections
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray-menu: 97/109] network: Use checkConnection to set up the initial connections
- Date: Thu, 9 May 2013 15:44:30 +0000 (UTC)
commit c6875f38913e349c1c6252fee512ebfee0a24a68
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
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 d5035ee..35e9e42 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -125,22 +125,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]