[gnome-shell] Clear the active network when removing the active access point



commit 82fc66305dc91f88e77dfa10d2f94d388a18d774
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Sep 18 13:27:50 2011 +0100

    Clear the active network when removing the active access point
    
    When the active AP disappears, it is possible to receive the
    "access-point-removed" signal before the "notify::active-ap" (as
    dbus-glib + libnm-glib property notifications are not reliable).
    In that case, we would remove the AP from the network object, thus
    an attempt to update the UI would create an item for an empty
    network.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=658150

 js/ui/status/network.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 0d5eaad..9730afc 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1291,6 +1291,9 @@ NMDeviceWireless.prototype = {
         apObj.accessPoints.splice(i, 1);
 
         if (apObj.accessPoints.length == 0) {
+            if (this._activeNetwork == apObj)
+                this._activeNetwork = null;
+
             if (apObj.item)
                 apObj.item.destroy();
 



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