diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 16:02:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 16:02:13 +0000 |
commit | da39772a192949a0d98547a06aa464276a9b4091 (patch) | |
tree | a3ec4e7a561f5ad7daac8fdeba585c48511fa1ba /extensions/hibernate-status/prefs.js | |
parent | Updating disable-workspace-switcher to version 3 [39fded2]. (diff) | |
download | gnome-shell-extensions-extra-da39772a192949a0d98547a06aa464276a9b4091.tar.xz gnome-shell-extensions-extra-da39772a192949a0d98547a06aa464276a9b4091.zip |
Updating hibernate-status to version 1.12 [d11284d].
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | extensions/hibernate-status/prefs.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/extensions/hibernate-status/prefs.js b/extensions/hibernate-status/prefs.js index cdcd50e..83b5843 100644 --- a/extensions/hibernate-status/prefs.js +++ b/extensions/hibernate-status/prefs.js @@ -17,15 +17,25 @@ var Prefs = class Prefs { this.KEY_HIBERNATE_WORKS_CHECK = "hibernate-works-check"; this._schemaName = "org.gnome.shell.extensions.hibernate-status-button"; - let schemaDir = Me.dir.get_child('schemas').get_path(); + // first try developer local schema + try { + let schemaDir = Me.dir.get_child('schemas').get_path(); - let schemaSource = Gio.SettingsSchemaSource.new_from_directory( - schemaDir, Gio.SettingsSchemaSource.get_default(), false - ); - let schema = schemaSource.lookup(this._schemaName, false); + let schemaSource = Gio.SettingsSchemaSource.new_from_directory( + schemaDir, Gio.SettingsSchemaSource.get_default(), false + ); + let schema = schemaSource.lookup(this._schemaName, false); + + this._setting = new Gio.Settings({ + settings_schema: schema + }); + return; + } catch (e) { + // now try system-wide one below + } this._setting = new Gio.Settings({ - settings_schema: schema + schema_id: this._schemaName }); } /** |