From b3a400f6db9a97b982915af2a9b4a3aacdf72c29 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 8 Sep 2022 22:53:21 +0200 Subject: data/: Rename org.ayatana.display.gschema.xml.in to org.ayatana.indicator.display.gschema.xml. Fix and simplify translations of .gschema.xml strings with it. --- data/CMakeLists.txt | 8 +------- data/org.ayatana.display.gschema.xml.in | 24 ------------------------ data/org.ayatana.indicator.display.gschema.xml | 24 ++++++++++++++++++++++++ po/POTFILES.in | 1 + tests/unit/CMakeLists.txt | 4 ++-- 5 files changed, 28 insertions(+), 33 deletions(-) delete mode 100644 data/org.ayatana.display.gschema.xml.in create mode 100644 data/org.ayatana.indicator.display.gschema.xml diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 17ddf23..b7a68dc 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -4,14 +4,8 @@ find_package(GSettings) ## GSettings schema ## -set (SCHEMA_NAME "org.ayatana.display.gschema.xml") +set (SCHEMA_NAME "org.ayatana.indicator.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) diff --git a/data/org.ayatana.display.gschema.xml.in b/data/org.ayatana.display.gschema.xml.in deleted file mode 100644 index afcd996..0000000 --- a/data/org.ayatana.display.gschema.xml.in +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - false - <_summary>Lock rotation - <_description> - Lock automatic display rotation. - - - - "none" - <_summary>Orientation lock - <_description>Locks orientation to a specific value. - - - diff --git a/data/org.ayatana.indicator.display.gschema.xml b/data/org.ayatana.indicator.display.gschema.xml new file mode 100644 index 0000000..9afa253 --- /dev/null +++ b/data/org.ayatana.indicator.display.gschema.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + false + Lock rotation + + Lock automatic display rotation. + + + + "none" + Orientation lock + Locks orientation to a specific value. + + + diff --git a/po/POTFILES.in b/po/POTFILES.in index 8d88dd5..1cb6f88 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,4 @@ +data/org.ayatana.indicator.display.gschema.xml src/adbd-client.cpp src/exporter.cpp src/greeter.cpp diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 7d42693..930eb70 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -12,7 +12,7 @@ set_source_files_properties (gschemas.compiled GENERATED) # and help the tests to find that file by setting -DSCHEMA_DIR set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas") set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas") -set (DISPLAY_SCHEMA ${CMAKE_BINARY_DIR}/data/org.ayatana.display.gschema.xml) +set (DISPLAY_SCHEMA ${CMAKE_BINARY_DIR}/data/org.ayatana.indicator.display.gschema.xml) add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE @@ -23,7 +23,7 @@ execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compil # https://discourse.cmake.org/t/race-condition-when-multi-add-custom-target-deps-on-same-file-generated-by-add-custom-command/2358 # https://bugs.debian.org/892091 (bug for ayatana-indicators-power, but applies here as well) add_custom_command (OUTPUT gschemas.compiled - DEPENDS ${CMAKE_BINARY_DIR}/data/org.ayatana.display.gschema.xml + DEPENDS ${CMAKE_BINARY_DIR}/data/org.ayatana.indicator.display.gschema.xml COMMAND mkdir -p ${SCHEMA_DIR} COMMAND cp -f ${DISPLAY_SCHEMA} ${SCHEMA_DIR} COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) -- cgit v1.2.3