aboutsummaryrefslogtreecommitdiff
path: root/src/rotation-lock.cpp
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-11-19 12:17:30 +0100
committerRobert Tari <robert@tari.in>2021-11-19 12:17:30 +0100
commit809eb8cffb47629733258feb915f9cf348ab7345 (patch)
treec83c457014f69088aecfeef6cc3b4cb5f455e474 /src/rotation-lock.cpp
parent5a2368bf0bf87721540ec0183b6ba4c88fd0be3e (diff)
parentf59500bfe360dce317af6b3c24c9a71206e9011a (diff)
downloadayatana-indicator-display-809eb8cffb47629733258feb915f9cf348ab7345.tar.gz
ayatana-indicator-display-809eb8cffb47629733258feb915f9cf348ab7345.tar.bz2
ayatana-indicator-display-809eb8cffb47629733258feb915f9cf348ab7345.zip
Merge branch 'sunweaver-pr/consolidate-gschema-usage'
Attributes GH PR #40: https://github.com/AyatanaIndicators/ayatana-indicator-display/pull/40
Diffstat (limited to 'src/rotation-lock.cpp')
-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");
}
+
}
}