[gnome-tetravex/unify-app-id] Reverse domain name for XDG files



commit 22a4477ee93f78ee80225ef23fc192d21e5f6e32
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Sun Jan 20 19:12:07 2019 +0100

    Reverse domain name for XDG files
    
    Unify the app-id by using org.gnome.Tetravex for appdata,desktop & icons files
    Also updates the schema & resources to use the same id

 .../{gnome-tetravex.png => org.gnome.Tetravex.png}      | Bin
 .../{gnome-tetravex.png => org.gnome.Tetravex.png}      | Bin
 .../{gnome-tetravex.png => org.gnome.Tetravex.png}      | Bin
 .../{gnome-tetravex.png => org.gnome.Tetravex.png}      | Bin
 .../{gnome-tetravex.png => org.gnome.Tetravex.png}      | Bin
 ...vex-symbolic.svg => org.gnome.Tetravex-symbolic.svg} |   0
 .../{gnome-tetravex.svg => org.gnome.Tetravex.svg}      |   0
 data/meson.build                                        |  16 ++++++++--------
 ...appdata.xml.in => org.gnome.Tetravex.appdata.xml.in} |  10 +++++++---
 ...etravex.desktop.in => org.gnome.Tetravex.desktop.in} |   2 +-
 ...ravex.gschema.xml => org.gnome.Tetravex.gschema.xml} |   2 +-
 meson.build                                             |   2 ++
 po/POTFILES.in                                          |   6 +++---
 src/gnome-tetravex.gresource.xml                        |   5 ++---
 src/gnome-tetravex.ui                                   |   2 +-
 src/gnome-tetravex.vala                                 |  12 ++++++------
 16 files changed, 31 insertions(+), 26 deletions(-)
---
diff --git a/data/icons/hicolor/16x16/gnome-tetravex.png b/data/icons/hicolor/16x16/org.gnome.Tetravex.png
similarity index 100%
rename from data/icons/hicolor/16x16/gnome-tetravex.png
rename to data/icons/hicolor/16x16/org.gnome.Tetravex.png
diff --git a/data/icons/hicolor/22x22/gnome-tetravex.png b/data/icons/hicolor/22x22/org.gnome.Tetravex.png
similarity index 100%
rename from data/icons/hicolor/22x22/gnome-tetravex.png
rename to data/icons/hicolor/22x22/org.gnome.Tetravex.png
diff --git a/data/icons/hicolor/24x24/gnome-tetravex.png b/data/icons/hicolor/24x24/org.gnome.Tetravex.png
similarity index 100%
rename from data/icons/hicolor/24x24/gnome-tetravex.png
rename to data/icons/hicolor/24x24/org.gnome.Tetravex.png
diff --git a/data/icons/hicolor/32x32/gnome-tetravex.png b/data/icons/hicolor/32x32/org.gnome.Tetravex.png
similarity index 100%
rename from data/icons/hicolor/32x32/gnome-tetravex.png
rename to data/icons/hicolor/32x32/org.gnome.Tetravex.png
diff --git a/data/icons/hicolor/48x48/gnome-tetravex.png b/data/icons/hicolor/48x48/org.gnome.Tetravex.png
similarity index 100%
rename from data/icons/hicolor/48x48/gnome-tetravex.png
rename to data/icons/hicolor/48x48/org.gnome.Tetravex.png
diff --git a/data/icons/hicolor/scalable/gnome-tetravex-symbolic.svg 
b/data/icons/hicolor/scalable/org.gnome.Tetravex-symbolic.svg
similarity index 100%
rename from data/icons/hicolor/scalable/gnome-tetravex-symbolic.svg
rename to data/icons/hicolor/scalable/org.gnome.Tetravex-symbolic.svg
diff --git a/data/icons/hicolor/scalable/gnome-tetravex.svg 
b/data/icons/hicolor/scalable/org.gnome.Tetravex.svg
similarity index 100%
rename from data/icons/hicolor/scalable/gnome-tetravex.svg
rename to data/icons/hicolor/scalable/org.gnome.Tetravex.svg
diff --git a/data/meson.build b/data/meson.build
index e9eeede..05af859 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,27 +1,27 @@
 foreach size: [ '16x16', '22x22', '24x24', '32x32', '48x48']
-    install_data (join_paths ('icons', 'hicolor', size, 'gnome-tetravex.png'),
+    install_data (join_paths ('icons', 'hicolor', size, '@0@.png'.format(project_id)),
                   install_dir: join_paths (datadir, 'icons', 'hicolor', size, 'apps'))
 endforeach
-install_data (join_paths ('icons', 'hicolor', 'scalable', 'gnome-tetravex.svg'),
+install_data (join_paths ('icons', 'hicolor', 'scalable', '@0@.svg'.format(project_id)),
               install_dir: join_paths (datadir, 'icons', 'hicolor', 'scalable', 'apps'))
-install_data (join_paths ('icons', 'hicolor', 'scalable', 'gnome-tetravex-symbolic.svg'),
+install_data (join_paths ('icons', 'hicolor', 'scalable', '@0 -symbolic svg'.format(project_id)),
               install_dir: join_paths (datadir, 'icons', 'hicolor', 'scalable', 'apps'))
 
-install_data ('org.gnome.tetravex.gschema.xml',
+install_data ('@0  gschema xml'.format(project_id),
               install_dir: join_paths (datadir, 'glib-2.0', 'schemas'))
 meson.add_install_script ('meson_compile_gschema.py')
 
 i18n.merge_file ('desktop-file',
-                 input: 'gnome-tetravex.desktop.in',
-                 output: 'gnome-tetravex.desktop',
+                 input: '@0  desktop in'.format(project_id),
+                 output: '@0@.desktop'.format(project_id),
                  install: true,
                  install_dir: join_paths (datadir, 'applications'),
                  po_dir: '../po',
                  type: 'desktop')
 
 i18n.merge_file ('appdata-file',
-                 input: 'gnome-tetravex.appdata.xml.in',
-                 output: 'gnome-tetravex.appdata.xml',
+                 input: '@0  appdata xml in'.format(project_id),
+                 output: '@0  appdata xml'.format(project_id),
                  install: true,
                  install_dir: join_paths (datadir, 'metainfo'),
                  po_dir: '../po')
diff --git a/data/gnome-tetravex.appdata.xml.in b/data/org.gnome.Tetravex.appdata.xml.in
similarity index 92%
rename from data/gnome-tetravex.appdata.xml.in
rename to data/org.gnome.Tetravex.appdata.xml.in
index ff7b638..480e1fc 100644
--- a/data/gnome-tetravex.appdata.xml.in
+++ b/data/org.gnome.Tetravex.appdata.xml.in
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Copyright 2013 Michael Catanzaro -->
-<component type="desktop">
-  <id>gnome-tetravex.desktop</id>
+<component type="desktop-application">
+  <id>org.gnome.Tetravex</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+ and CC-BY-SA-3.0</project_license>
   <name>GNOME Tetravex</name>
@@ -22,14 +22,18 @@
       <image>https://people.gnome.org/~mcatanzaro/gnome-tetravex.png</image>
     </screenshot>
   </screenshots>
+  <launchable type="desktop-id">org.gnome.Tetravex.desktop</launchable>
   <url type="homepage">https://wiki.gnome.org/Apps/Tetravex</url>
   <url type="bugtracker">https://gitlab.gnome.org/GNOME/gnome-tetravex/issues</url>
   <url type="donation">https://www.gnome.org/friends/</url>
   <url type="help">https://help.gnome.org/users/gnome-tetravex/stable/</url>
   <update_contact>mcatanzaro_at_gnome.org</update_contact>
   <project_group>GNOME</project_group>
+  <developer_name>The GNOME Project</developer_name>
+  <provides>
+    <id>gnome-tetravex.desktop</id>
+  </provides>
   <kudos>
-    <kudo>AppMenu</kudo>
     <kudo>HiDpiIcon</kudo>
     <kudo>ModernToolkit</kudo>
     <kudo>UserDocs</kudo>
diff --git a/data/gnome-tetravex.desktop.in b/data/org.gnome.Tetravex.desktop.in
similarity index 95%
rename from data/gnome-tetravex.desktop.in
rename to data/org.gnome.Tetravex.desktop.in
index 5b39b9f..b79982b 100644
--- a/data/gnome-tetravex.desktop.in
+++ b/data/org.gnome.Tetravex.desktop.in
@@ -8,7 +8,7 @@ Keywords=game;logic;board;
 Exec=gnome-tetravex
 # TRANSLATORS: Do NOT translate or transliterate this text!
 #              This is an icon file name.
-Icon=gnome-tetravex
+Icon=org.gnome.Tetravex
 Terminal=false
 Type=Application
 Categories=GNOME;GTK;Game;LogicGame;
diff --git a/data/org.gnome.tetravex.gschema.xml b/data/org.gnome.Tetravex.gschema.xml
similarity index 92%
rename from data/org.gnome.tetravex.gschema.xml
rename to data/org.gnome.Tetravex.gschema.xml
index 69dcdd8..286f14a 100644
--- a/data/org.gnome.tetravex.gschema.xml
+++ b/data/org.gnome.Tetravex.gschema.xml
@@ -1,5 +1,5 @@
 <schemalist>
-  <schema id="org.gnome.tetravex" path="/org/gnome/tetravex/" gettext-domain="gnome-tetravex">
+  <schema id="org.gnome.Tetravex" path="/org/gnome/tetravex/" gettext-domain="gnome-tetravex">
     <key name="grid-size" type="i">
       <default>3</default>
       <range min="2" max="6" />
diff --git a/meson.build b/meson.build
index 7933b53..6d00387 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,8 @@ project ('gnome-tetravex', ['vala', 'c'],
          ],
          meson_version: '>= 0.37.1')
 
+project_id = 'org.gnome.Tetravex'
+
 gnome = import ('gnome')
 i18n = import ('i18n')
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4317c9d..634ef6a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,8 +1,8 @@
 # List of source files containing translatable strings.
 # Please keep this file in alphabetical order.
-data/gnome-tetravex.appdata.xml.in
-data/gnome-tetravex.desktop.in
-data/org.gnome.tetravex.gschema.xml
+data/org.gnome.Tetravex.appdata.xml.in
+data/org.gnome.Tetravex.desktop.in
+data/org.gnome.Tetravex.gschema.xml
 src/app-menu.ui
 src/gnome-tetravex.ui
 src/gnome-tetravex.vala
diff --git a/src/gnome-tetravex.gresource.xml b/src/gnome-tetravex.gresource.xml
index 7f1d34d..e405d53 100644
--- a/src/gnome-tetravex.gresource.xml
+++ b/src/gnome-tetravex.gresource.xml
@@ -1,11 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
-  <gresource prefix="/org/gnome/tetravex">
+  <gresource prefix="/org/gnome/Tetravex">
     <file preprocess="xml-stripblanks">gnome-tetravex.ui</file>
     <file preprocess="xml-stripblanks">app-menu.ui</file>
   </gresource>
-  <gresource prefix="/org/gnome/tetravex/gtk">
+  <gresource prefix="/org/gnome/Tetravex/gtk">
     <file preprocess="xml-stripblanks">help-overlay.ui</file>
   </gresource>
 </gresources>
-<?xml version="1.0" encoding="UTF-8"?>
diff --git a/src/gnome-tetravex.ui b/src/gnome-tetravex.ui
index 537380a..9605003 100644
--- a/src/gnome-tetravex.ui
+++ b/src/gnome-tetravex.ui
@@ -5,7 +5,7 @@
   <object class="GtkApplicationWindow" id="gnome-tetravex-window">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Tetravex</property>
-    <property name="icon-name">gnome-tetravex</property>
+    <property name="icon-name">org.gnome.Tetravex</property>
     <child>
       <object class="GtkGrid" id="grid">
         <property name="visible">True</property>
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index f1d18f0..4c0891b 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -59,7 +59,7 @@ public class Tetravex : Gtk.Application
 
     public Tetravex ()
     {
-        Object (application_id: "org.gnome.tetravex", flags: ApplicationFlags.FLAGS_NONE);
+        Object (application_id: "org.gnome.Tetravex", flags: ApplicationFlags.FLAGS_NONE);
 
         add_main_option_entries (option_entries);
     }
@@ -69,7 +69,7 @@ public class Tetravex : Gtk.Application
         base.startup ();
 
         Environment.set_application_name (_("Tetravex"));
-        Gtk.Window.set_default_icon_name ("gnome-tetravex");
+        Gtk.Window.set_default_icon_name ("org.gnome.Tetravex");
 
         add_action_entries (action_entries, this);
         set_accels_for_action ("app.new-game", {"<Primary>n"});
@@ -81,9 +81,9 @@ public class Tetravex : Gtk.Application
         set_accels_for_action ("app.move-left", {"<Primary>Left"});
         set_accels_for_action ("app.move-right", {"<Primary>Right"});
 
-        var builder = new Gtk.Builder.from_resource ("/org/gnome/tetravex/gnome-tetravex.ui");
+        var builder = new Gtk.Builder.from_resource ("/org/gnome/Tetravex/gnome-tetravex.ui");
 
-        settings = new Settings ("org.gnome.tetravex");
+        settings = new Settings ("org.gnome.Tetravex");
 
         history = new History (Path.build_filename (Environment.get_user_data_dir (), "gnome-tetravex", 
"history"));
         history.load ();
@@ -107,7 +107,7 @@ public class Tetravex : Gtk.Application
         headerbar.show_close_button = true;
         window.set_titlebar (headerbar);
 
-        var menu_builder = new Gtk.Builder.from_resource ("/org/gnome/tetravex/app-menu.ui");
+        var menu_builder = new Gtk.Builder.from_resource ("/org/gnome/Tetravex/app-menu.ui");
         var appmenu = menu_builder.get_object("app-menu") as MenuModel;
         var menu_button = new Gtk.MenuButton ();
         menu_button.set_image (new Gtk.Image.from_icon_name ("open-menu-symbolic", Gtk.IconSize.BUTTON));
@@ -397,7 +397,7 @@ public class Tetravex : Gtk.Application
                                "authors", authors,
                                "documenters", documenters,
                                "translator-credits", _("translator-credits"),
-                               "logo-icon-name", "gnome-tetravex",
+                               "logo-icon-name", "org.gnome.Tetravex",
                                "website", "https://wiki.gnome.org/Apps/Tetravex";,
                                null);
     }


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