[gnome-shell/gnome-3-8] main: Use the correct schema for 'dynamic-workspaces'



commit 3ff194247ab3d16d9a16953f14f84bb4e79b674d
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jun 6 18:47:56 2013 +0200

    main: Use the correct schema for 'dynamic-workspaces'
    
    We currently monitor the shell's override schema for changes to
    the 'dynamic-workspaces' key, which ends up being the wrong
    schema in classic mode. With the new ability to use mode-specific
    overides, we can finally fix this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701717

 js/ui/main.js |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index 10c9fb5..bd5dc47 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -38,7 +38,6 @@ const Magnifier = imports.ui.magnifier;
 const XdndHandler = imports.ui.xdndHandler;
 const Util = imports.misc.util;
 
-const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
 const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
 
 let componentManager = null;
@@ -68,7 +67,7 @@ let layoutManager = null;
 let _startDate;
 let _defaultCssStylesheet = null;
 let _cssStylesheet = null;
-let _overridesSettings = null;
+let _workspacesSettings = null;
 
 function _sessionUpdated() {
     _loadDefaultStylesheet();
@@ -119,6 +118,15 @@ function _initializePrefs() {
     let keys = new Gio.Settings({ schema: sessionMode.overridesSchema }).list_keys();
     for (let i = 0; i < keys.length; i++)
         Meta.prefs_override_preference_schema (keys[i], sessionMode.overridesSchema);
+
+    let workspacesSchema;
+    if (keys.indexOf('dynamic-workspaces') > -1)
+        workspacesSchema = sessionMode.overridesSchema;
+    else
+        workspacesSchema = 'org.gnome.mutter';
+
+     _workspacesSettings = new Gio.Settings({ schema: workspacesSchema });
+     _workspacesSettings.connect('changed::dynamic-workspaces', _queueCheckWorkspaces);
 }
 
 function _initializeUI() {
@@ -186,9 +194,6 @@ function _initializeUI() {
         Scripting.runPerfScript(module, perfOutput);
     }
 
-    _overridesSettings = new Gio.Settings({ schema: OVERRIDES_SCHEMA });
-    _overridesSettings.connect('changed::dynamic-workspaces', _queueCheckWorkspaces);
-
     global.screen.connect('notify::n-workspaces', _nWorkspacesChanged);
 
     global.screen.connect('window-entered-monitor', _windowEnteredMonitor);


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