diff options
author | Robert Tari <robert@tari.in> | 2021-11-19 12:17:30 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-11-19 12:17:30 +0100 |
commit | 809eb8cffb47629733258feb915f9cf348ab7345 (patch) | |
tree | c83c457014f69088aecfeef6cc3b4cb5f455e474 /src/rotation-lock.cpp | |
parent | 5a2368bf0bf87721540ec0183b6ba4c88fd0be3e (diff) | |
parent | f59500bfe360dce317af6b3c24c9a71206e9011a (diff) | |
download | ayatana-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.cpp | 25 |
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"); } + } } |