[gnome-mahjongg] make the app-id consistent



commit 17f6271d23b443d0ed0a299f67e74ae46657cd0d
Author: Bilal ELmoussaoui <bilelmoussaoui bilelmoussaoui lan>
Date:   Sun Dec 9 20:34:38 2018 +0100

    make the app-id consistent

 data/gnome-mahjongg.gresource.xml                  |   6 ----
 .../{gnome-mahjongg.png => org.gnome.Mahjongg.png} | Bin
 .../{gnome-mahjongg.png => org.gnome.Mahjongg.png} | Bin
 .../{gnome-mahjongg.png => org.gnome.Mahjongg.png} | Bin
 .../{gnome-mahjongg.png => org.gnome.Mahjongg.png} | Bin
 .../{gnome-mahjongg.png => org.gnome.Mahjongg.png} | Bin
 ...ymbolic.svg => org.gnome.Mahjongg-symbolic.svg} |   0
 .../{gnome-mahjongg.svg => org.gnome.Mahjongg.svg} |   0
 data/meson.build                                   |  25 ++++++++-------
 data/meson_compile_gschema.py                      |  10 ------
 data/meson_post_install.py                         |  13 ++++++++
 ...ta.xml.in => org.gnome.Mahjongg.appdata.xml.in} |   3 +-
 ...gg.desktop.in => org.gnome.Mahjongg.desktop.in} |   2 +-
 data/org.gnome.Mahjongg.gresource.xml              |   6 ++++
 ....gschema.xml => org.gnome.Mahjongg.gschema.xml} |   2 +-
 ...gnome-mahjongg.yaml => org.gnome.Mahjongg.yaml} |   5 +--
 flatpak/org.gnome.gnome-mahjongg.json              |  35 ---------------------
 meson.build                                        |   1 +
 po/POTFILES.in                                     |   6 ++--
 src/gnome-mahjongg.vala                            |   8 ++---
 src/meson.build                                    |   4 +--
 21 files changed, 47 insertions(+), 79 deletions(-)
---
diff --git a/data/icons/hicolor/16x16/gnome-mahjongg.png b/data/icons/hicolor/16x16/org.gnome.Mahjongg.png
similarity index 100%
rename from data/icons/hicolor/16x16/gnome-mahjongg.png
rename to data/icons/hicolor/16x16/org.gnome.Mahjongg.png
diff --git a/data/icons/hicolor/22x22/gnome-mahjongg.png b/data/icons/hicolor/22x22/org.gnome.Mahjongg.png
similarity index 100%
rename from data/icons/hicolor/22x22/gnome-mahjongg.png
rename to data/icons/hicolor/22x22/org.gnome.Mahjongg.png
diff --git a/data/icons/hicolor/24x24/gnome-mahjongg.png b/data/icons/hicolor/24x24/org.gnome.Mahjongg.png
similarity index 100%
rename from data/icons/hicolor/24x24/gnome-mahjongg.png
rename to data/icons/hicolor/24x24/org.gnome.Mahjongg.png
diff --git a/data/icons/hicolor/32x32/gnome-mahjongg.png b/data/icons/hicolor/32x32/org.gnome.Mahjongg.png
similarity index 100%
rename from data/icons/hicolor/32x32/gnome-mahjongg.png
rename to data/icons/hicolor/32x32/org.gnome.Mahjongg.png
diff --git a/data/icons/hicolor/48x48/gnome-mahjongg.png b/data/icons/hicolor/48x48/org.gnome.Mahjongg.png
similarity index 100%
rename from data/icons/hicolor/48x48/gnome-mahjongg.png
rename to data/icons/hicolor/48x48/org.gnome.Mahjongg.png
diff --git a/data/icons/hicolor/scalable/gnome-mahjongg-symbolic.svg 
b/data/icons/hicolor/scalable/org.gnome.Mahjongg-symbolic.svg
similarity index 100%
rename from data/icons/hicolor/scalable/gnome-mahjongg-symbolic.svg
rename to data/icons/hicolor/scalable/org.gnome.Mahjongg-symbolic.svg
diff --git a/data/icons/hicolor/scalable/gnome-mahjongg.svg 
b/data/icons/hicolor/scalable/org.gnome.Mahjongg.svg
similarity index 100%
rename from data/icons/hicolor/scalable/gnome-mahjongg.svg
rename to data/icons/hicolor/scalable/org.gnome.Mahjongg.svg
diff --git a/data/meson.build b/data/meson.build
index da9c561..63a317d 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,36 +1,39 @@
 foreach size: [ '16x16', '22x22', '24x24', '32x32', '48x48' ]
-    install_data (join_paths ('icons', 'hicolor', size, 'gnome-mahjongg.png'),
+    install_data (join_paths ('icons', 'hicolor', size, 'org.gnome.Mahjongg.png'),
                   install_dir: join_paths (datadir, 'icons', 'hicolor', size, 'apps'))
 endforeach
-install_data (join_paths ('icons', 'hicolor', 'scalable', 'gnome-mahjongg.svg'),
+install_data (join_paths ('icons', 'hicolor', 'scalable', 'org.gnome.Mahjongg.svg'),
               install_dir: join_paths (datadir, 'icons', 'hicolor', 'scalable', 'apps'))
-install_data (join_paths ('icons', 'hicolor', 'scalable', 'gnome-mahjongg-symbolic.svg'),
+install_data (join_paths ('icons', 'hicolor', 'scalable', 'org.gnome.Mahjongg-symbolic.svg'),
               install_dir: join_paths (datadir, 'icons', 'hicolor', 'scalable', 'apps'))
 
-install_data ('org.gnome.mahjongg.gschema.xml',
+install_data ('org.gnome.Mahjongg.gschema.xml',
               install_dir: join_paths (datadir, 'glib-2.0', 'schemas'))
-meson.add_install_script ('meson_compile_gschema.py')
 
 install_data ('mahjongg.map', install_dir: join_paths (pkgdatadir, 'maps'))
-
-install_data ('maya.png', install_dir: join_paths (pkgdatadir, 'themes'))
 install_data ('postmodern.svg', install_dir: join_paths (pkgdatadir, 'themes'))
 install_data ('smooth.png', install_dir: join_paths (pkgdatadir, 'themes'))
 install_data ('edu_kang_xi.png', install_dir: join_paths (pkgdatadir, 'themes'))
 
 i18n.merge_file ('desktop-file',
-                 input: 'gnome-mahjongg.desktop.in',
-                 output: 'gnome-mahjongg.desktop',
+                 input: 'org.gnome.Mahjongg.desktop.in',
+                 output: 'org.gnome.Mahjongg.desktop',
                  install: true,
                  install_dir: join_paths (datadir, 'applications'),
                  po_dir: '../po',
                  type: 'desktop')
 
 i18n.merge_file ('appdata-file',
-                 input: 'gnome-mahjongg.appdata.xml.in',
-                 output: 'gnome-mahjongg.appdata.xml',
+                 input: 'org.gnome.Mahjongg.appdata.xml.in',
+                 output: 'org.gnome.Mahjongg.appdata.xml',
                  install: true,
                  install_dir: join_paths (datadir, 'metainfo'),
                  po_dir: '../po')
 
 install_man ('gnome-mahjongg.6')
+
+resources = gnome.compile_resources ('resources', 'org.gnome.Mahjongg.gresource.xml',
+                                     source_dir: '.',
+                                     c_name: 'resources')
+
+
diff --git a/data/meson_post_install.py b/data/meson_post_install.py
new file mode 100755
index 0000000..7412c96
--- /dev/null
+++ b/data/meson_post_install.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+datadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share')
+
+if not os.environ.get('DESTDIR'):
+    print('Compiling gsettings schemas...')
+    subprocess.call(['glib-compile-schemas', os.path.join(datadir, 'glib-2.0', 'schemas')])
+    print('Updating icon cache...')
+    subprocess.call(['gtk-update-icon-cache', '-qtf', os.path.join(datadir, 'icons/hicolor')])
+
diff --git a/data/gnome-mahjongg.appdata.xml.in b/data/org.gnome.Mahjongg.appdata.xml.in
similarity index 94%
rename from data/gnome-mahjongg.appdata.xml.in
rename to data/org.gnome.Mahjongg.appdata.xml.in
index 0c70204..134af39 100644
--- a/data/gnome-mahjongg.appdata.xml.in
+++ b/data/org.gnome.Mahjongg.appdata.xml.in
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Copyright 2013 Michael Catanzaro -->
 <component type="desktop">
-  <id>gnome-mahjongg.desktop</id>
+  <id>org.gnome.Mahjongg</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+ and CC-BY-SA-3.0</project_license>
   <name>GNOME Mahjongg</name>
@@ -27,6 +27,7 @@
       <caption><!-- Describe this screenshot in less than ~10 words --></caption>
     </screenshot>
   </screenshots>
+  <launchable type="desktop-id">org.gnome.Mahjongg.desktop</launchable>
   <url type="homepage">https://wiki.gnome.org/Apps/Mahjongg</url>
   <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-mahjongg</url>
   <url type="donation">http://www.gnome.org/friends/</url>
diff --git a/data/gnome-mahjongg.desktop.in b/data/org.gnome.Mahjongg.desktop.in
similarity index 95%
rename from data/gnome-mahjongg.desktop.in
rename to data/org.gnome.Mahjongg.desktop.in
index da468bb..483ae02 100644
--- a/data/gnome-mahjongg.desktop.in
+++ b/data/org.gnome.Mahjongg.desktop.in
@@ -5,7 +5,7 @@ Comment=Disassemble a pile of tiles by removing matching pairs
 Keywords=game;strategy;puzzle;board;
 Exec=gnome-mahjongg
 # Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=gnome-mahjongg
+Icon=org.gnome.Mahjongg
 Terminal=false
 Type=Application
 Categories=GNOME;GTK;Game;BoardGame;
diff --git a/data/org.gnome.Mahjongg.gresource.xml b/data/org.gnome.Mahjongg.gresource.xml
new file mode 100644
index 0000000..0f95661
--- /dev/null
+++ b/data/org.gnome.Mahjongg.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/Mahjongg/gtk">
+    <file preprocess="xml-stripblanks" compressed="true">help-overlay.ui</file>
+  </gresource>
+</gresources>
diff --git a/data/org.gnome.mahjongg.gschema.xml b/data/org.gnome.Mahjongg.gschema.xml
similarity index 92%
rename from data/org.gnome.mahjongg.gschema.xml
rename to data/org.gnome.Mahjongg.gschema.xml
index 2dcc8ea..491d963 100644
--- a/data/org.gnome.mahjongg.gschema.xml
+++ b/data/org.gnome.Mahjongg.gschema.xml
@@ -1,5 +1,5 @@
 <schemalist>
-  <schema id="org.gnome.mahjongg" path="/org/gnome/mahjongg/" gettext-domain="gnome-mahjongg">
+  <schema id="org.gnome.Mahjongg" path="/org/gnome/Mahjongg/" gettext-domain="gnome-mahjongg">
     <key name="show-toolbar" type="b">
       <default>true</default>
     </key>
diff --git a/flatpak/org.gnome.gnome-mahjongg.yaml b/flatpak/org.gnome.Mahjongg.yaml
similarity index 76%
rename from flatpak/org.gnome.gnome-mahjongg.yaml
rename to flatpak/org.gnome.Mahjongg.yaml
index dd92aae..859d39b 100644
--- a/flatpak/org.gnome.gnome-mahjongg.yaml
+++ b/flatpak/org.gnome.Mahjongg.yaml
@@ -1,11 +1,8 @@
-app-id: org.gnome.gnome-mahjongg
+app-id: org.gnome.Mahjongg
 runtime: org.gnome.Platform
 sdk: org.gnome.Sdk
 runtime-version: '3.30'
 command: gnome-mahjongg
-rename-desktop-file: gnome-mahjongg.desktop
-rename-appdata-file: gnome-mahjongg.appdata.xml
-rename-icon: gnome-mahjongg
 
 finish-args:
   - --share=ipc
diff --git a/meson.build b/meson.build
index 785ca4c..38caef6 100644
--- a/meson.build
+++ b/meson.build
@@ -25,3 +25,4 @@ subdir ('po')
 subdir ('data')
 subdir ('help')
 subdir ('src')
+meson.add_install_script ('data/meson_post_install.py')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index fea5bcc..7b6033a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,9 +1,9 @@
 # List of source files containing translatable strings.
 # Please keep this file in alphabetical order.
-data/gnome-mahjongg.appdata.xml.in
-data/gnome-mahjongg.desktop.in
+data/org.gnome.Mahjongg.appdata.xml.in
+data/org.gnome.Mahjongg.desktop.in
 data/help-overlay.ui
-data/org.gnome.mahjongg.gschema.xml
+data/org.gnome.Mahjongg.gschema.xml
 data/translatable_game_names.h
 src/game.vala
 src/game-view.vala
diff --git a/src/gnome-mahjongg.vala b/src/gnome-mahjongg.vala
index 031e534..6a72f9a 100644
--- a/src/gnome-mahjongg.vala
+++ b/src/gnome-mahjongg.vala
@@ -52,7 +52,7 @@ public class Mahjongg : Gtk.Application
 
     public Mahjongg ()
     {
-        Object (application_id: "org.gnome.gnome-mahjongg", flags: ApplicationFlags.FLAGS_NONE);
+        Object (application_id: "org.gnome.Mahjongg", flags: ApplicationFlags.FLAGS_NONE);
 
         add_main_option_entries (option_entries);
     }
@@ -70,7 +70,7 @@ public class Mahjongg : Gtk.Application
         set_accels_for_action ("app.help", {"F1"});
         set_accels_for_action ("app.quit", {"<Primary>q", "<Primary>w"});
 
-        settings = new Settings ("org.gnome.mahjongg");
+        settings = new Settings ("org.gnome.Mahjongg");
 
         load_maps ();
 
@@ -604,7 +604,7 @@ public class Mahjongg : Gtk.Application
                                "artists", artists,
                                "documenters", documenters,
                                "translator-credits", _("translator-credits"),
-                               "logo-icon-name", "gnome-mahjongg",
+                               "logo-icon-name", "org.gnome.Mahjongg",
                                "website", "https://wiki.gnome.org/Apps/Mahjongg";,
                                null);
     }
@@ -780,7 +780,7 @@ public class Mahjongg : Gtk.Application
         Intl.textdomain (GETTEXT_PACKAGE);
 
         Environment.set_application_name (_("Mahjongg"));
-        Gtk.Window.set_default_icon_name ("gnome-mahjongg");
+        Gtk.Window.set_default_icon_name ("org.gnome.Mahjongg");
 
         var app = new Mahjongg ();
         var result = app.run (args);
diff --git a/src/meson.build b/src/meson.build
index 3c59028..9ab079d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,6 +1,4 @@
-resources = gnome.compile_resources ('resources', '../data/gnome-mahjongg.gresource.xml',
-                                     source_dir: '../data',
-                                     c_name: 'resources')
+
 
 gnome_mahjongg = executable ('gnome-mahjongg',
                              [ 'config.vapi',


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