aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2018-03-26 15:58:52 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-26 21:02:35 +0000
commiteec442b9de799ca1c955f460537157b7a5c69b89 (patch)
treed04ea5cd603d40e9b5faaed4d4920630bc89585a /data
parentb72e44163e22433fd3f0cab38d126fde4545ab8f (diff)
downloadayatana-indicator-datetime-eec442b9de799ca1c955f460537157b7a5c69b89.tar.gz
ayatana-indicator-datetime-eec442b9de799ca1c955f460537157b7a5c69b89.tar.bz2
ayatana-indicator-datetime-eec442b9de799ca1c955f460537157b7a5c69b89.zip
generate .gschema.xml.in to include cmake constants e.g. alarm_default_sound
Diffstat (limited to 'data')
-rw-r--r--data/CMakeLists.txt16
-rw-r--r--data/org.ayatana.indicator.datetime.gschema.xml.in.in (renamed from data/org.ayatana.indicator.datetime.gschema.xml)2
2 files changed, 14 insertions, 4 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index bd03e9d..f158346 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -2,9 +2,19 @@
## GSettings schema
##
-find_package (GSettings)
-
-add_schema ("org.ayatana.indicator.datetime.gschema.xml")
+include (UseGSettings)
+set (SCHEMA_NAME "org.ayatana.indicator.datetime.gschema.xml")
+set (SCHEMA_FILE_IN_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in.in")
+set (SCHEMA_FILE_IN "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}.in")
+set (SCHEMA_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}")
+# generate the .xml.in file so cmake constants are included
+configure_file(${SCHEMA_FILE_IN_IN} ${SCHEMA_FILE_IN})
+# generate the .xml file using intltool
+set (ENV{LC_ALL} "C")
+execute_process (COMMAND intltool-merge -quiet --xml-style --utf8 --no-translations "${SCHEMA_FILE_IN}" "${SCHEMA_FILE}")
+
+# let UseGSettings do the rest
+add_schema (${SCHEMA_FILE})
##
## Systemd Unit File
diff --git a/data/org.ayatana.indicator.datetime.gschema.xml b/data/org.ayatana.indicator.datetime.gschema.xml.in.in
index 86facab..0af3f1b 100644
--- a/data/org.ayatana.indicator.datetime.gschema.xml
+++ b/data/org.ayatana.indicator.datetime.gschema.xml.in.in
@@ -132,7 +132,7 @@
</description>
</key>
<key name="alarm-default-sound" type="s">
- <default>'/usr/share/sounds/ubuntu/ringtones/Alarm clock.ogg'</default>
+ <default>'${ALARM_DEFAULT_SOUND}'</default>
<summary>The alarm's default sound file.</summary>
<description>
If an alarm doesn't specify its own sound file, this file will be used as the fallback sound.