aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-19 09:16:00 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-19 09:34:25 +0100
commitf59500bfe360dce317af6b3c24c9a71206e9011a (patch)
treec83c457014f69088aecfeef6cc3b4cb5f455e474 /src
parent5a2368bf0bf87721540ec0183b6ba4c88fd0be3e (diff)
downloadayatana-indicator-display-f59500bfe360dce317af6b3c24c9a71206e9011a.tar.gz
ayatana-indicator-display-f59500bfe360dce317af6b3c24c9a71206e9011a.tar.bz2
ayatana-indicator-display-f59500bfe360dce317af6b3c24c9a71206e9011a.zip
GSettings: Use org.ayatana.display.gschema.xml for non-Lomiri sessions and unit tests.
Additionally, internationalize the org.ayatana.display GSettings schema. Fixes https://github.com/AyatanaIndicators/ayatana-indicator-display/issues/39
Diffstat (limited to 'src')
-rw-r--r--src/rotation-lock.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/rotation-lock.cpp b/src/rotation-lock.cpp
index ad89e10..cb864af 100644
--- a/src/rotation-lock.cpp
+++ b/src/rotation-lock.cpp
@@ -38,16 +38,24 @@ public:
if (pSource != NULL)
{
- GSettingsSchema *pSchema = g_settings_schema_source_lookup(pSource, "com.lomiri.touch.system", FALSE);
+ if (ayatana_common_utils_is_lomiri()) {
+
+ GSettingsSchema *pSchema = g_settings_schema_source_lookup(pSource, "com.lomiri.touch.system", FALSE);
+
+ if (pSchema != NULL)
+ {
+ g_settings_schema_unref(pSchema);
+ m_settings = g_settings_new("com.lomiri.touch.system");
+ }
+ else
+ {
+ g_error("No schema could be found");
+ }
- if (pSchema != NULL)
- {
- g_settings_schema_unref(pSchema);
- m_settings = g_settings_new("com.lomiri.touch.system");
}
- else
- {
- pSchema = g_settings_schema_source_lookup(pSource, "org.ayatana.indicator.display", FALSE);
+ else {
+
+ GSettingsSchema *pSchema = g_settings_schema_source_lookup(pSource, "org.ayatana.indicator.display", FALSE);
if (pSchema != NULL)
{
@@ -58,6 +66,7 @@ public:
{
g_error("No schema could be found");
}
+
}
}