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:
Giovanni Campagna
2011-12-16 22:11:12 +01:00
parent dd6b0dc7a9
commit 374abed8a1
13 changed files with 38 additions and 259 deletions
-11
View File
@@ -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)
+5 -5
View File
@@ -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();
}
}
@@ -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>