[gtranslator] meson: Application id conf to appdata and desktop



commit c500b61daa2037364e362135978f1d0ff49b46b1
Author: Daniel GarcĂ­a Moreno <danigm wadobo com>
Date:   Sun Sep 16 09:34:09 2018 +0200

    meson: Application id conf to appdata and desktop
    
    This change fixes the MR:
    https://gitlab.gnome.org/GNOME/gtranslator/merge_requests/11

 data/meson.build                                    | 21 +++++++++++++++++++--
 ...l.in => org.gnome.Gtranslator.appdata.xml.in.in} |  2 +-
 ...sktop.in => org.gnome.Gtranslator.desktop.in.in} |  2 +-
 3 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 51572df2..134697f1 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -5,10 +5,27 @@ subdir('pixmaps')
 desktop = 'org.gnome.Gtranslator.desktop'
 appdata = 'org.gnome.Gtranslator.appdata.xml'
 
+desktop_conf = configuration_data()
+desktop_conf.set('icon', application_id)
+appdata_conf = configuration_data()
+appdata_conf.set('appid', application_id)
+
+desktop_in = configure_file(
+    input: desktop + '.in.in',
+    output: desktop + '.in',
+    configuration: desktop_conf
+)
+
+appdata_in = configure_file(
+    input: appdata + '.in.in',
+    output: appdata + '.in',
+    configuration: appdata_conf
+)
+
 i18n.merge_file(
       desktop,
          type: 'desktop',
-        input: desktop + '.in',
+        input: desktop_in,
        output: desktop,
        po_dir: po_dir,
       install: true,
@@ -18,7 +35,7 @@ i18n.merge_file(
 i18n.merge_file(
       appdata,
          type: 'xml',
-        input: appdata + '.in',
+        input: appdata_in,
        output: appdata,
        po_dir: po_dir,
       install: true,
diff --git a/data/org.gnome.Gtranslator.appdata.xml.in b/data/org.gnome.Gtranslator.appdata.xml.in.in
similarity index 98%
rename from data/org.gnome.Gtranslator.appdata.xml.in
rename to data/org.gnome.Gtranslator.appdata.xml.in.in
index 0a6e8050..2a402338 100644
--- a/data/org.gnome.Gtranslator.appdata.xml.in
+++ b/data/org.gnome.Gtranslator.appdata.xml.in.in
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <component type="desktop">
-  <id>org.gnome.Gtranslator</id>
+  <id>@appid@</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+ AND GPL-3.0+</project_license>
   <name>Gtranslator</name>
diff --git a/data/org.gnome.Gtranslator.desktop.in b/data/org.gnome.Gtranslator.desktop.in.in
similarity index 93%
rename from data/org.gnome.Gtranslator.desktop.in
rename to data/org.gnome.Gtranslator.desktop.in.in
index 7228a8ef..cbc978bc 100644
--- a/data/org.gnome.Gtranslator.desktop.in
+++ b/data/org.gnome.Gtranslator.desktop.in.in
@@ -3,7 +3,7 @@ Name=Gtranslator
 GenericName=PO File Editor
 Comment=Translate and localize applications and libraries
 # Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=org.gnome.Gtranslator
+Icon=@icon@
 Exec=gtranslator %F
 Terminal=false
 Type=Application


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]