all: remove all GSettings usage
Since GSettings is not supported in extensions in 3.2, all settings have been replaced by constants in JS files (except for user-theme, whose only purpose is to actually bridge GSettings to the shell). Customizations are still supported in master, and distributions packaging these extensions for system-wide install may consider reverting this bug.
This commit is contained in:
@@ -1,14 +1,3 @@
|
||||
EXTENSION_ID = auto-move-windows
|
||||
|
||||
include ../../extension.mk
|
||||
|
||||
gschemas_in = $(gschemabase).auto-move-windows.gschema.xml.in
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
|
||||
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
|
||||
EXTRA_DIST += $(gschemas_in)
|
||||
|
||||
@@ -11,8 +11,9 @@ const St = imports.gi.St;
|
||||
|
||||
const Main = imports.ui.main;
|
||||
|
||||
const SETTINGS_SCHEMA = 'org.gnome.shell.extensions.auto-move-windows';
|
||||
const SETTINGS_KEY = 'application-list';
|
||||
// list of applications and workspace pairs
|
||||
// format: "desktop-file-id.desktop:<num>"
|
||||
const APPLICATIONS = [ ];
|
||||
|
||||
function WindowMover() {
|
||||
this._init();
|
||||
@@ -20,7 +21,6 @@ function WindowMover() {
|
||||
|
||||
WindowMover.prototype = {
|
||||
_init: function() {
|
||||
this._settings = new Gio.Settings({ schema: SETTINGS_SCHEMA });
|
||||
this._windowTracker = Shell.WindowTracker.get_default();
|
||||
|
||||
let display = global.screen.get_display();
|
||||
@@ -46,7 +46,7 @@ WindowMover.prototype = {
|
||||
if (!this._windowTracker.is_window_interesting(window))
|
||||
return;
|
||||
|
||||
let spaces = this._settings.get_strv(SETTINGS_KEY);
|
||||
let spaces = APPLICATIONS;
|
||||
|
||||
let app = this._windowTracker.get_window_app(window);
|
||||
if (!app) {
|
||||
@@ -159,4 +159,4 @@ function enable() {
|
||||
function disable() {
|
||||
Main._checkWorkspaces = prevCheckWorkspaces;
|
||||
winMover.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
<schemalist gettext-domain="gnome-shell-extensions">
|
||||
<schema id="org.gnome.shell.extensions.auto-move-windows" path="/org/gnome/shell/extensions/auto-move-windows/">
|
||||
<key name="application-list" type="as">
|
||||
<!-- FIXME: should be a(su), when JS supports more of GVariant -->
|
||||
<default>[ ]</default>
|
||||
<_summary>Application and workspace list</_summary>
|
||||
<_description>A list of strings, each containing an application id (desktop file name), followed by a colon and the workspace number</_description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
Reference in New Issue
Block a user