[gnome-shell] Don't start new components when activating the screen-shield in gdm



commit f957ae71c381c3378b484edff181091cdbd95b84
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Wed Sep 5 12:48:14 2012 +0200

    Don't start new components when activating the screen-shield in gdm
    
    Previous code was activating the networkAgent and telepathyClient
    in the lock-screen, irrespective of the previous mode.
    Now it checks if the session mode is locked down, and if so it refuses
    to start new components.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683400

 js/ui/components/__init__.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/components/__init__.js b/js/ui/components/__init__.js
index 763c87d..cb37019 100644
--- a/js/ui/components/__init__.js
+++ b/js/ui/components/__init__.js
@@ -41,6 +41,9 @@ const ComponentManager = new Lang.Class({
         if (component)
             return component;
 
+	if (Main.sessionMode.isLocked)
+	    return null;
+
         let constructor = this._importComponent(name);
         component = new constructor();
         this._allComponents[name] = component;
@@ -49,7 +52,8 @@ const ComponentManager = new Lang.Class({
 
     _enableComponent: function(name) {
         let component = this._ensureComponent(name);
-        component.enable();
+	if (component)
+            component.enable();
     },
 
     _disableComponent: function(name) {



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