[gnome-tweak-tool] Always specify a file name for the org.gnome.shell.overrides schema
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Always specify a file name for the org.gnome.shell.overrides schema
- Date: Fri, 15 Mar 2013 18:44:25 +0000 (UTC)
commit b0a829da2cd9fd2986fd2cd2c8cd7ba867437678
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Feb 27 19:14:10 2013 +0100
Always specify a file name for the org.gnome.shell.overrides schema
We were only doing it for the ShowWindowButtons tweak which means the
schema would get cached and thus would succeed later by chance.
This breaks if gnome-shell is running in 'classic' mode since then we
use another schema for the ShowWindowButtons tweak and thus won't be
able to load org.gnome.shell.overrides later.
https://bugzilla.gnome.org/show_bug.cgi?id=694808
gtweak/tweaks/tweak_shell.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_shell.py b/gtweak/tweaks/tweak_shell.py
index e08b7d0..7a6d40d 100644
--- a/gtweak/tweaks/tweak_shell.py
+++ b/gtweak/tweaks/tweak_shell.py
@@ -35,8 +35,10 @@ class ShowWindowButtons(GSettingsComboTweak):
_shell = GnomeShellFactory().get_shell()
if _shell.mode in ['gdm', 'initial-setup', 'user']:
schema = "org.gnome.shell.overrides"
+ filename = "org.gnome.shell.gschema.xml"
else:
schema = "org.gnome.desktop.wm.preferences"
+ filename = None
GSettingsComboTweak.__init__(self,
schema,
@@ -45,6 +47,7 @@ class ShowWindowButtons(GSettingsComboTweak):
(':minimize,close', _("Minimize and Close")),
(':maximize,close', _("Maximize and Close")),
(':minimize,maximize,close', _("All"))),
+ schema_filename=filename,
**options)
class ShellThemeTweak(Tweak):
@@ -214,8 +217,10 @@ class StaticWorkspaceTweak(Tweak):
_shell = GnomeShellFactory().get_shell()
if _shell.mode in ['gdm', 'initial-setup', 'user']:
DYNAMIC_SCHEMA = "org.gnome.shell.overrides"
+ DYNAMIC_SCHEMA_FILENAME = "org.gnome.shell.gschema.xml"
else:
DYNAMIC_SCHEMA = "org.gnome.mutter"
+ DYNAMIC_SCHEMA_FILENAME = None
DYNAMIC_KEY = "dynamic-workspaces"
@@ -229,7 +234,7 @@ class StaticWorkspaceTweak(Tweak):
nwsettings = GSettingsFakeSetting()
try:
- dsettings = GSettingsSetting(self.DYNAMIC_SCHEMA, **options)
+ dsettings = GSettingsSetting(self.DYNAMIC_SCHEMA, schema_filename=self.DYNAMIC_SCHEMA_FILENAME,
**options)
except GSettingsMissingError:
self.loaded = False
dsettings = GSettingsFakeSetting()
@@ -263,12 +268,12 @@ TWEAK_GROUPS = (
GSettingsSwitchTweak("org.gnome.desktop.interface", "clock-show-date",
schema_filename="org.gnome.desktop.interface.gschema.xml"),
GSettingsSwitchTweak("org.gnome.desktop.interface", "clock-show-seconds",
schema_filename="org.gnome.desktop.interface.gschema.xml"),
GSettingsSwitchTweak("org.gnome.shell.calendar", "show-weekdate",
schema_filename="org.gnome.shell.gschema.xml"),
- ShowWindowButtons(schema_filename="org.gnome.shell.gschema.xml", size_group=sg),
+ ShowWindowButtons(size_group=sg),
GSettingsSwitchTweak("org.gnome.settings-daemon.plugins.power",
"lid-close-suspend-with-external-monitor"),
GSettingsComboEnumTweak("org.gnome.settings-daemon.plugins.power", "lid-close-battery-action",
size_group=sg),
GSettingsComboEnumTweak("org.gnome.settings-daemon.plugins.power", "lid-close-ac-action",
size_group=sg),
GSettingsComboEnumTweak("org.gnome.settings-daemon.plugins.power", "button-power",
size_group=sg),
GSettingsComboEnumTweak("org.gnome.settings-daemon.plugins.xrandr", "default-monitors-setup",
size_group=sg),
- GSettingsSwitchTweak("org.gnome.shell.overrides", "workspaces-only-on-primary"),
+ GSettingsSwitchTweak("org.gnome.shell.overrides", "workspaces-only-on-primary",
schema_filename="org.gnome.shell.gschema.xml"),
StaticWorkspaceTweak(size_group=sg)),
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]