[gnome-shell] network: Use activeApChanged to get the initial active network



commit e5f226612ebeb7f1dff1a5bd7bb481ed92cf6fd8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Apr 25 21:04:32 2013 -0400

    network: Use activeApChanged to get the initial active network
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698918

 js/ui/status/network.js |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 2cef443..9f53ce5 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -911,16 +911,7 @@ const NMDeviceWireless = new Lang.Class({
         for (let i = 0; i < this._networks.length; i++)
             sortAccessPoints(this._networks[i].accessPoints);
 
-        if (this.device.active_access_point) {
-            let networkPos = this._findNetwork(this.device.active_access_point);
-
-            if (networkPos == -1) // the connected access point is invisible
-                this._activeNetwork = null;
-            else
-                this._activeNetwork = this._networks[networkPos];
-        } else {
-            this._activeNetwork = null;
-        }
+        this._activeApChanged();
         this._networks.sort(this._networkSortFunction);
 
         this._apChangedId = device.connect('notify::active-access-point', Lang.bind(this, 
this._activeApChanged));


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