aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-14 09:30:18 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-14 09:30:18 +0100
commitcc077180e086230d0960a46f4063e76e84f0099d (patch)
treef311eeed562a52ad996afdbde835a9d1204ab440 /src
parentd389b92c0335a5a6d443e78d4446cd6ec36e9e57 (diff)
parent256b8334fd38bca9c93f09a9cf671ffa75666f3e (diff)
downloadayatana-indicator-display-cc077180e086230d0960a46f4063e76e84f0099d.tar.gz
ayatana-indicator-display-cc077180e086230d0960a46f4063e76e84f0099d.tar.bz2
ayatana-indicator-display-cc077180e086230d0960a46f4063e76e84f0099d.zip
Merge branch 'tari01-pr/missing-color-scheme'
Attributes GH PR https://github.com/AyatanaIndicators/ayatana-indicator-display/pull/81
Diffstat (limited to 'src')
-rw-r--r--src/service.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/service.cpp b/src/service.cpp
index ff29b4e..6a18da0 100644
--- a/src/service.cpp
+++ b/src/service.cpp
@@ -137,8 +137,17 @@ public:
if (pSchema != NULL)
{
+ gboolean bColorScheme = g_settings_schema_has_key (pSchema, "color-scheme");
g_settings_schema_unref (pSchema);
- pColorSchemeSettings = g_settings_new (sSchema);
+
+ if (bColorScheme)
+ {
+ pColorSchemeSettings = g_settings_new (sSchema);
+ }
+ else
+ {
+ g_warning ("org.gnome.desktop.interface::color-scheme not found. Native theme profile changes will not be triggered.");
+ }
}
else
{
@@ -321,7 +330,7 @@ private:
gboolean bSameColorScheme = g_str_equal (sColorScheme, pImpl->sLastColorScheme);
- if (!bSameColorScheme)
+ if (pImpl->pColorSchemeSettings && !bSameColorScheme)
{
g_debug ("Changing color scheme to %s", sColorScheme);