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
This commit is contained in:
Florian Müllner
2014-12-19 14:58:52 +01:00
parent a3f352d0c3
commit 8b59c031d5

View File

@@ -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;