[gnome-shell] networkAgent: ensure auto-register is set when the component is enabled



commit 00201f7e6cce22690fae2b672b5759149ec89df4
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Nov 15 22:47:32 2012 +0100

    networkAgent: ensure auto-register is set when the component is enabled
    
    Setting auto-register to true launches the initial registration, and will
    afterwards re-launch the agent registration if NetworkManager gets restarted.
    
    When the component is disabled we'll first disable auto-registration, and only
    then request to unregister.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688379

 js/ui/components/networkAgent.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
index 986c4bd..d1c9846 100644
--- a/js/ui/components/networkAgent.js
+++ b/js/ui/components/networkAgent.js
@@ -598,7 +598,7 @@ const NetworkAgent = new Lang.Class({
     },
 
     enable: function() {
-        this._native.register();
+        this._native.auto_register = true;
     },
 
     disable: function() {
@@ -612,6 +612,7 @@ const NetworkAgent = new Lang.Class({
             this._vpnRequests[requestId].cancel(true);
         this._vpnRequests = { };
 
+        this._native.auto_register = false;
         this._native.unregister();
     },
 



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