[gnome-shell] sessionMode: Add allowExtensions property



commit ab3173487d257ac94c1c0d9770f35e68120b6a89
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu May 17 02:08:56 2012 +0200

    sessionMode: Add allowExtensions property
    
    Add a sessionMode.allowExtensions property, which determines whether
    installed and enabled extensions should be loaded or ignored.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676156

 js/ui/main.js        |    8 +++++---
 js/ui/sessionMode.js |    2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 247200a..1e2a89d 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -136,9 +136,6 @@ function _initUserSession() {
 
     global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1);
 
-    ExtensionSystem.init();
-    ExtensionSystem.loadExtensions();
-
     Meta.keybindings_set_custom_handler('panel-run-dialog', function() {
        getRunDialog().open();
     });
@@ -229,6 +226,11 @@ function start() {
     if (sessionMode.sessionType == Shell.SessionType.USER)
         _initUserSession();
 
+    if (sessionMode.allowExtensions) {
+        ExtensionSystem.init();
+        ExtensionSystem.loadExtensions();
+    }
+
     if (sessionMode.hasOverview) {
         Meta.keybindings_set_custom_handler('panel-main-menu', function () {
             overview.toggle();
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index 2572149..737b574 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -12,12 +12,14 @@ const _modes = {
              hasAppMenu: false,
              showCalendarEvents: false,
              allowSettings: false,
+             allowExtensions: false,
              sessionType: Shell.SessionType.GDM },
 
     'user': { hasOverview: true,
               hasAppMenu: true,
               showCalendarEvents: true,
               allowSettings: true,
+              allowExtensions: true,
               sessionType: Shell.SessionType.USER }
 };
 



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