aboutsummaryrefslogtreecommitdiff
path: root/data
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 /data
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 'data')
-rw-r--r--data/CMakeLists.txt17
-rw-r--r--data/org.ayatana.display.gschema.xml.in (renamed from data/org.ayatana.display.gschema.xml)10
2 files changed, 18 insertions, 9 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index acc462f..6f8cda1 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,12 +1,21 @@
find_package(GSettings)
##
-## GSettings
+## GSettings schema
##
-if(NOT EXISTS /usr/share/glib-2.0/schemas/com.lomiri.touch.system.gschema.xml)
- add_schema ("org.ayatana.indicator.display.gschema.xml")
-endif()
+set (SCHEMA_NAME "org.ayatana.display.gschema.xml")
+set (SCHEMA_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}")
+set (SCHEMA_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in")
+
+# generate the .xml file using intltool
+find_package(Intltool REQUIRED)
+set (ENV{LC_ALL} "C")
+intltool_merge_translations("${SCHEMA_FILE_IN}" "${SCHEMA_FILE}" ALL UTF8 STYLE "xml" NO_TRANSLATIONS)
+
+# let GSettings do the rest
+find_package(GSettings REQUIRED)
+add_schema (${SCHEMA_NAME})
##
## Systemd Unit File
diff --git a/data/org.ayatana.display.gschema.xml b/data/org.ayatana.display.gschema.xml.in
index 9afa253..afcd996 100644
--- a/data/org.ayatana.display.gschema.xml
+++ b/data/org.ayatana.display.gschema.xml.in
@@ -10,15 +10,15 @@
<schema id="org.ayatana.indicator.display" path="/org/ayatana/indicator/display/">
<key name="rotation-lock" type="b">
<default>false</default>
- <summary>Lock rotation</summary>
- <description>
+ <_summary>Lock rotation</_summary>
+ <_description>
Lock automatic display rotation.
- </description>
+ </_description>
</key>
<key name="orientation-lock" enum="org.ayatana.indicator.display.ScreenOrientation">
<default>"none"</default>
- <summary>Orientation lock</summary>
- <description>Locks orientation to a specific value.</description>
+ <_summary>Orientation lock</_summary>
+ <_description>Locks orientation to a specific value.</_description>
</key>
</schema>
</schemalist>