[gnome-shell-extensions] window-list: Do not hardcode overrides schema



commit 8b59c031d525de5a8ebefccfbc19cf99f885ee04
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Dec 19 14:58:52 2014 +0100

    window-list: Do not hardcode overrides schema
    
    Classic mode uses a different overrides schema, so make sure we use the
    correct setting instead of hardcoding the usual org.gnome.shell.overrides
    schema.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737486

 extensions/window-list/extension.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 0677777..0f9fc83 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -848,7 +848,7 @@ const WindowList = new Lang.Class({
         this._workspaceIndicator = new WorkspaceIndicator();
         indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true });
 
-        this._workspaceSettings = new Gio.Settings({ schema_id: 'org.gnome.shell.overrides' });
+        this._workspaceSettings = this._getWorkspaceSettings();
         this._workspacesOnlyOnPrimaryChangedId =
             this._workspaceSettings.connect('changed::workspaces-only-on-primary',
                                             Lang.bind(this, this._updateWorkspaceIndicatorVisibility));
@@ -954,6 +954,13 @@ const WindowList = new Lang.Class({
         this._groupingModeChanged();
     },
 
+    _getWorkspaceSettings: function() {
+        let settings = global.get_overrides_settings();
+        if (settings.list_keys().indexOf('workspaces-only-on-primary') > -1)
+            return settings;
+        return new Gio.Settings({ schema_id: 'org.gnome.mutter' });
+    },
+
     _onScrollEvent: function(actor, event) {
         let direction = event.get_scroll_direction();
         let diff = 0;


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