aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-11-11 12:11:13 +0100
committerRobert Tari <robert@tari.in>2023-11-11 12:11:13 +0100
commit256b8334fd38bca9c93f09a9cf671ffa75666f3e (patch)
treef311eeed562a52ad996afdbde835a9d1204ab440 /src
parentd389b92c0335a5a6d443e78d4446cd6ec36e9e57 (diff)
downloadayatana-indicator-display-256b8334fd38bca9c93f09a9cf671ffa75666f3e.tar.gz
ayatana-indicator-display-256b8334fd38bca9c93f09a9cf671ffa75666f3e.tar.bz2
ayatana-indicator-display-256b8334fd38bca9c93f09a9cf671ffa75666f3e.zip
src/service.cpp: Handle missing org.gnome.desktop.interface::color-scheme
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);