aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-14 09:28:46 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-14 09:28:46 +0100
commit9e2550b651c954a5d88b35c05e9d8b0faabe6fa1 (patch)
tree03ec3939d62af05469ea731d495881cc6a4bf386
parent7b6fe13c018a1cb42da88c0f7ee600c7303cf760 (diff)
parent23e2fd7da079ec72f40ac53ce6141a24f8a024d5 (diff)
downloadayatana-settings-9e2550b651c954a5d88b35c05e9d8b0faabe6fa1.tar.gz
ayatana-settings-9e2550b651c954a5d88b35c05e9d8b0faabe6fa1.tar.bz2
ayatana-settings-9e2550b651c954a5d88b35c05e9d8b0faabe6fa1.zip
Merge branch 'tari01-pr/missing-color-scheme'
Attributes GH PR #23: https://github.com/AyatanaIndicators/ayatana-settings/pull/23
-rwxr-xr-xayatana-settings16
1 files changed, 12 insertions, 4 deletions
diff --git a/ayatana-settings b/ayatana-settings
index ded25a9..3ee11a2 100755
--- a/ayatana-settings
+++ b/ayatana-settings
@@ -45,14 +45,22 @@ class AyatanaSettings:
sys.exit(1)
buildApp(self)
+ pSource = Gio.SettingsSchemaSource.get_default ()
+ pSchema = pSource.lookup ('org.gnome.desktop.interface', False);
- self.pGnomeSettings = Gio.Settings.new ('org.gnome.desktop.interface')
- self.pGnomeSettings.connect ('changed::color-scheme', self.onColorSchemeChanged)
- self.onColorSchemeChanged (self.pGnomeSettings, 'color-scheme')
+ if pSchema:
+
+ bFound = pSchema.has_key ('color-scheme')
+
+ if bFound:
+
+ self.pGnomeSettings = Gio.Settings.new ('org.gnome.desktop.interface')
+ self.pGnomeSettings.connect ('changed::color-scheme', self.onColorSchemeChanged)
+ self.onColorSchemeChanged (self.pGnomeSettings, 'color-scheme')
self.bSystemd = isSystemd()
self.bInit = False
-
+
try:
self.sDesktop = os.environ['XDG_CURRENT_DESKTOP']
except KeyError: