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



commit 0b9b3231db15987ed862b1de75a93b1188022f50
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Sun Jan 20 19:01:00 2019 +0100

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

 data/icons/16x16/{tali.png => org.gnome.Tali.png}       | Bin
 data/icons/22x22/{tali.png => org.gnome.Tali.png}       | Bin
 data/icons/24x24/{tali.png => org.gnome.Tali.png}       | Bin
 data/icons/256x256/{tali.png => org.gnome.Tali.png}     | Bin
 data/icons/32x32/{tali.png => org.gnome.Tali.png}       | Bin
 data/icons/48x48/{tali.png => org.gnome.Tali.png}       | Bin
 data/icons/512x512/{tali.png => org.gnome.Tali.png}     | Bin
 .../{tali-symbolic.svg => org.gnome.Tali-symbolic.svg}  |   0
 data/meson.build                                        |  16 ++++++++--------
 ...ali.appdata.xml.in => org.gnome.Tali.appdata.xml.in} |  10 ++++++----
 data/{tali.desktop.in => org.gnome.Tali.desktop.in}     |   2 +-
 ...nome.tali.gschema.xml => org.gnome.Tali.gschema.xml} |   2 +-
 meson.build                                             |   2 ++
 po/POTFILES.in                                          |   6 +++---
 src/gyahtzee.c                                          |  12 ++++++------
 src/tali.gresource.xml                                  |   4 ++--
 16 files changed, 29 insertions(+), 25 deletions(-)
---
diff --git a/data/icons/16x16/tali.png b/data/icons/16x16/org.gnome.Tali.png
similarity index 100%
rename from data/icons/16x16/tali.png
rename to data/icons/16x16/org.gnome.Tali.png
diff --git a/data/icons/22x22/tali.png b/data/icons/22x22/org.gnome.Tali.png
similarity index 100%
rename from data/icons/22x22/tali.png
rename to data/icons/22x22/org.gnome.Tali.png
diff --git a/data/icons/24x24/tali.png b/data/icons/24x24/org.gnome.Tali.png
similarity index 100%
rename from data/icons/24x24/tali.png
rename to data/icons/24x24/org.gnome.Tali.png
diff --git a/data/icons/256x256/tali.png b/data/icons/256x256/org.gnome.Tali.png
similarity index 100%
rename from data/icons/256x256/tali.png
rename to data/icons/256x256/org.gnome.Tali.png
diff --git a/data/icons/32x32/tali.png b/data/icons/32x32/org.gnome.Tali.png
similarity index 100%
rename from data/icons/32x32/tali.png
rename to data/icons/32x32/org.gnome.Tali.png
diff --git a/data/icons/48x48/tali.png b/data/icons/48x48/org.gnome.Tali.png
similarity index 100%
rename from data/icons/48x48/tali.png
rename to data/icons/48x48/org.gnome.Tali.png
diff --git a/data/icons/512x512/tali.png b/data/icons/512x512/org.gnome.Tali.png
similarity index 100%
rename from data/icons/512x512/tali.png
rename to data/icons/512x512/org.gnome.Tali.png
diff --git a/data/icons/symbolic/tali-symbolic.svg b/data/icons/symbolic/org.gnome.Tali-symbolic.svg
similarity index 100%
rename from data/icons/symbolic/tali-symbolic.svg
rename to data/icons/symbolic/org.gnome.Tali-symbolic.svg
diff --git a/data/meson.build b/data/meson.build
index c27eebc..51d54aa 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,9 +1,9 @@
 foreach size: [ '16x16', '22x22', '24x24', '32x32', '48x48', '256x256', '512x512']
-    install_data (join_paths ('icons', size, 'tali.png'),
+    install_data (join_paths ('icons', size, project_id + '.png'),
                   install_dir: join_paths (datadir, 'icons', 'hicolor', size, 'apps'))
 endforeach
-install_data (join_paths ('icons', 'symbolic', 'tali-symbolic.svg'),
-              install_dir: join_paths (datadir, 'icons', 'hicolor', 'scalable', 'apps'))
+install_data (join_paths ('icons', 'symbolic', project_id + '-symbolic.svg'),
+              install_dir: join_paths (datadir, 'icons', 'hicolor', 'symbolic', 'apps'))
 
 install_data ([ 'gnome-dice-1.svg',
                 'gnome-dice-2.svg',
@@ -21,21 +21,21 @@ install_data ([ 'gnome-dice-1.svg',
                 'kismet-none.svg'],
                 install_dir: pkgdatadir)
 
-install_data ('org.gnome.tali.gschema.xml',
+install_data (project_id + '.gschema.xml',
               install_dir: join_paths (datadir, 'glib-2.0', 'schemas'))
 meson.add_install_script ('meson_compile_gschema.py')
 
 i18n.merge_file ('desktop-file',
-                 input: 'tali.desktop.in',
-                 output: 'tali.desktop',
+                 input: project_id + '.desktop.in',
+                 output: project_id + '.desktop',
                  install: true,
                  install_dir: join_paths (datadir, 'applications'),
                  po_dir: '../po',
                  type: 'desktop')
 
 i18n.merge_file ('appdata-file',
-                 input: 'tali.appdata.xml.in',
-                 output: 'tali.appdata.xml',
+                 input: project_id + '.appdata.xml.in',
+                 output: project_id + '.appdata.xml',
                  install: true,
                  install_dir: join_paths (datadir, 'metainfo'),
                  po_dir: '../po')
diff --git a/data/tali.appdata.xml.in b/data/org.gnome.Tali.appdata.xml.in
similarity index 89%
rename from data/tali.appdata.xml.in
rename to data/org.gnome.Tali.appdata.xml.in
index b80b2ad..dad32ee 100644
--- a/data/tali.appdata.xml.in
+++ b/data/org.gnome.Tali.appdata.xml.in
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Copyright 2013 Michael Catanzaro -->
-<component type="desktop">
-  <id>tali.desktop</id>
+<component type="desktop-application">
+  <id>org.gnome.Tali</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+</project_license>
   <name>Tali</name>
@@ -20,9 +20,9 @@
   <screenshots>
     <screenshot type="default" width="972" height="561">
       <image>https://people.gnome.org/~mcatanzaro/tali.png</image>
-      <caption><!-- Describe this screenshot in less than ~10 words --></caption>
     </screenshot>
   </screenshots>
+  <launchable type="desktop-id">org.gnome.Tali.desktop</launchable>
   <url type="homepage">https://wiki.gnome.org/Apps/Tali</url>
   <url type="bugtracker">https://gitlab.gnome.org/GNOME/tali/issues</url>
   <url type="donation">https://www.gnome.org/friends/</url>
@@ -31,8 +31,10 @@
   <update_contact>mariowenzel_at_gnome.org</update_contact>
   <project_group>GNOME</project_group>
   <developer_name>The GNOME Project</developer_name>
+  <provides>
+    <id>tali.desktop</id>
+  </provides>
   <kudos>
-    <kudo>AppMenu</kudo>
     <kudo>HiDpiIcon</kudo>
     <kudo>HighContrast</kudo>
     <kudo>ModernToolkit</kudo>
diff --git a/data/tali.desktop.in b/data/org.gnome.Tali.desktop.in
similarity index 95%
rename from data/tali.desktop.in
rename to data/org.gnome.Tali.desktop.in
index dbbc21b..75c3960 100644
--- a/data/tali.desktop.in
+++ b/data/org.gnome.Tali.desktop.in
@@ -8,7 +8,7 @@ Keywords=yahtzee;
 Exec=tali
 # TRANSLATORS: Do NOT translate or transliterate this text!
 #              This is an icon file name.
-Icon=tali
+Icon=org.gnome.Tali
 Terminal=false
 Type=Application
 Categories=GNOME;GTK;Game;CardGame;
diff --git a/data/org.gnome.tali.gschema.xml b/data/org.gnome.Tali.gschema.xml
similarity index 94%
rename from data/org.gnome.tali.gschema.xml
rename to data/org.gnome.Tali.gschema.xml
index 81e501b..2ab5395 100644
--- a/data/org.gnome.tali.gschema.xml
+++ b/data/org.gnome.Tali.gschema.xml
@@ -1,5 +1,5 @@
 <schemalist>
-  <schema id="org.gnome.tali" path="/org/gnome/tali/" gettext-domain="tali">
+  <schema id="org.gnome.Tali" path="/org/gnome/Tali/" gettext-domain="tali">
     <key name="number-of-computer-opponents" type="i">
       <default>3</default>
     </key>
diff --git a/meson.build b/meson.build
index aa2aae4..fa952f6 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,8 @@ project ('tali', ['c'],
          ],
          meson_version: '>= 0.37.1')
 
+project_id = 'org.gnome.Tali'
+
 gnome = import ('gnome')
 i18n = import ('i18n')
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1f00ad8..61cfff7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,10 +1,10 @@
 # List of source files containing translatable strings.
 # Please keep this file in alphabetical order.
 data/help-overlay.ui
-data/tali.appdata.xml.in
-data/tali.desktop.in
+data/org.gnome.Tali.appdata.xml.in
+data/org.gnome.Tali.desktop.in
+data/org.gnome.Tali.gschema.xml
 data/tali-menus.ui
-data/org.gnome.tali.gschema.xml
 src/clist.c
 src/games-scores-dialog.c
 src/gyahtzee.c
diff --git a/src/gyahtzee.c b/src/gyahtzee.c
index a69a42b..8ba5853 100644
--- a/src/gyahtzee.c
+++ b/src/gyahtzee.c
@@ -616,7 +616,7 @@ about_cb (GSimpleAction * action, GVariant * parameter, gpointer data)
                         "authors", authors,
                         "documenters", documenters,
                         "translator-credits", _("translator-credits"),
-                        "logo-icon-name", "tali",
+                        "logo-icon-name", "org.gnome.Tali",
                         "website",
                         "https://wiki.gnome.org/Apps/Tali";,
                         NULL);
@@ -734,7 +734,7 @@ GyahtzeeCreateMainWindow (GApplication *app, gpointer user_data)
   gtk_window_set_application (GTK_WINDOW (window), application);
   gtk_window_set_title (GTK_WINDOW (window), _(appName));
   gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (window), FALSE);
-  gtk_window_set_icon_name (GTK_WINDOW (window), "tali");
+  gtk_window_set_icon_name (GTK_WINDOW (window), "org.gnome.Tali");
 
   //games_conf_add_window (GTK_WINDOW (window), NULL);
 
@@ -773,7 +773,7 @@ GyahtzeeCreateMainWindow (GApplication *app, gpointer user_data)
   gtk_widget_show (undo_button);
   gtk_header_bar_pack_start (GTK_HEADER_BAR (hbar), undo_button);
 
-  builder = gtk_builder_new_from_resource ("/org/gnome/tali/ui/menus.ui");
+  builder = gtk_builder_new_from_resource ("/org/gnome/Tali/ui/menus.ui");
   appmenu = (GMenuModel *) gtk_builder_get_object (builder, "app-menu");
 
   menu_button = gtk_menu_button_new();
@@ -874,7 +874,7 @@ main (int argc, char *argv[])
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
-  application = gtk_application_new ("org.gnome.tali", 0);
+  application = gtk_application_new ("org.gnome.Tali", 0);
   g_signal_connect (application, "startup", G_CALLBACK (GyahtzeeCreateMainWindow), NULL);
   g_signal_connect (application, "activate", G_CALLBACK (GyahtzeeActivateGame), NULL);
 
@@ -895,7 +895,7 @@ main (int argc, char *argv[])
     exit (1);
   }
 
-  settings = g_settings_new ("org.gnome.tali");
+  settings = g_settings_new ("org.gnome.Tali");
 
   g_set_application_name (_(appName));
 
@@ -944,7 +944,7 @@ main (int argc, char *argv[])
                                  0 /* default category */,
                                  GAMES_SCORES_STYLE_PLAIN_DESCENDING);
 
-  gtk_window_set_default_icon_name ("tali");
+  gtk_window_set_default_icon_name ("org.gnome.Tali");
 
   if (NumberOfComputers == 0)  /* Not set on the command-line. */
     NumberOfComputers = g_settings_get_int (settings, "number-of-computer-opponents");
diff --git a/src/tali.gresource.xml b/src/tali.gresource.xml
index 6fc7b92..ea7486c 100644
--- a/src/tali.gresource.xml
+++ b/src/tali.gresource.xml
@@ -4,10 +4,10 @@
     <file preprocess="xml-stripblanks" alias="tali.ui">../data/tali.ui</file>
     <file alias="tali.css">../data/tali.css</file>
   </gresource> -->
-  <gresource prefix="/org/gnome/tali/ui">
+  <gresource prefix="/org/gnome/Tali/ui">
     <file preprocess="xml-stripblanks" alias="menus.ui">../data/tali-menus.ui</file>
   </gresource>
-  <gresource prefix="/org/gnome/tali/gtk">
+  <gresource prefix="/org/gnome/Tali/gtk">
     <file preprocess="xml-stripblanks" alias="help-overlay.ui">../data/help-overlay.ui</file>
   </gresource>
 </gresources>


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