[gnome-chess] app-id: unify the app-id
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] app-id: unify the app-id
- Date: Wed, 9 Jan 2019 16:03:14 +0000 (UTC)
commit 9b910aa5202bcad26a7f1c418e389b68c0a69ce4
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Wed Jan 9 14:20:33 2019 +0100
app-id: unify the app-id
Use org.gnome.Chess as the app-id and follow the new freedesktop standards for appdata/desktop/icons
files names
https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html
.../apps/{gnome-chess.png => org.gnome.Chess.png} | Bin
.../apps/{gnome-chess.png => org.gnome.Chess.png} | Bin
.../apps/{gnome-chess.png => org.gnome.Chess.png} | Bin
.../apps/{gnome-chess.png => org.gnome.Chess.png} | Bin
.../apps/{gnome-chess.png => org.gnome.Chess.png} | Bin
.../apps/{gnome-chess.png => org.gnome.Chess.png} | Bin
...s-symbolic.svg => org.gnome.Chess-symbolic.svg} | 0
data/meson.build | 10 ++++-----
...pdata.xml.in => org.gnome.Chess.appdata.xml.in} | 7 +++---
...chess.desktop.in => org.gnome.Chess.desktop.in} | 2 +-
...ess.gschema.xml => org.gnome.Chess.gschema.xml} | 24 ++++++++++-----------
meson.build | 2 +-
org.gnome.Chess.json | 8 +------
po/POTFILES.in | 6 +++---
src/chess.gresource.xml | 4 ++--
src/gnome-chess.vala | 14 ++++++------
src/meson.build | 2 +-
17 files changed, 37 insertions(+), 42 deletions(-)
---
diff --git a/data/icons/hicolor/16x16/apps/gnome-chess.png b/data/icons/hicolor/16x16/apps/org.gnome.Chess.png
similarity index 100%
rename from data/icons/hicolor/16x16/apps/gnome-chess.png
rename to data/icons/hicolor/16x16/apps/org.gnome.Chess.png
diff --git a/data/icons/hicolor/24x24/apps/gnome-chess.png b/data/icons/hicolor/24x24/apps/org.gnome.Chess.png
similarity index 100%
rename from data/icons/hicolor/24x24/apps/gnome-chess.png
rename to data/icons/hicolor/24x24/apps/org.gnome.Chess.png
diff --git a/data/icons/hicolor/256x256/apps/gnome-chess.png
b/data/icons/hicolor/256x256/apps/org.gnome.Chess.png
similarity index 100%
rename from data/icons/hicolor/256x256/apps/gnome-chess.png
rename to data/icons/hicolor/256x256/apps/org.gnome.Chess.png
diff --git a/data/icons/hicolor/32x32/apps/gnome-chess.png b/data/icons/hicolor/32x32/apps/org.gnome.Chess.png
similarity index 100%
rename from data/icons/hicolor/32x32/apps/gnome-chess.png
rename to data/icons/hicolor/32x32/apps/org.gnome.Chess.png
diff --git a/data/icons/hicolor/48x48/apps/gnome-chess.png b/data/icons/hicolor/48x48/apps/org.gnome.Chess.png
similarity index 100%
rename from data/icons/hicolor/48x48/apps/gnome-chess.png
rename to data/icons/hicolor/48x48/apps/org.gnome.Chess.png
diff --git a/data/icons/hicolor/512x512/apps/gnome-chess.png
b/data/icons/hicolor/512x512/apps/org.gnome.Chess.png
similarity index 100%
rename from data/icons/hicolor/512x512/apps/gnome-chess.png
rename to data/icons/hicolor/512x512/apps/org.gnome.Chess.png
diff --git a/data/icons/hicolor/scalable/apps/gnome-chess-symbolic.svg
b/data/icons/hicolor/scalable/apps/org.gnome.Chess-symbolic.svg
similarity index 100%
rename from data/icons/hicolor/scalable/apps/gnome-chess-symbolic.svg
rename to data/icons/hicolor/scalable/apps/org.gnome.Chess-symbolic.svg
diff --git a/data/meson.build b/data/meson.build
index dd93144..04cc741 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -12,8 +12,8 @@ install_data('engines.conf',
# The desktop file
i18n.merge_file(
- input: 'gnome-chess.desktop.in',
- output: 'gnome-chess.desktop',
+ input: '@0 desktop in'.format(application_id),
+ output: '@0@.desktop'.format(application_id),
type: 'desktop',
po_dir: po_dir,
install: true,
@@ -22,15 +22,15 @@ i18n.merge_file(
# The appdata file
i18n.merge_file(
- input: 'gnome-chess.appdata.xml.in',
- output: 'gnome-chess.appdata.xml',
+ input: '@0 appdata xml in'.format(application_id),
+ output: '@0 appdata xml'.format(application_id),
type: 'xml',
po_dir: po_dir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
-install_data('org.gnome.chess.gschema.xml',
+install_data('@0 gschema xml'.format(application_id),
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
)
diff --git a/data/gnome-chess.appdata.xml.in b/data/org.gnome.Chess.appdata.xml.in
similarity index 93%
rename from data/gnome-chess.appdata.xml.in
rename to data/org.gnome.Chess.appdata.xml.in
index 630c948..ae73bf2 100644
--- a/data/gnome-chess.appdata.xml.in
+++ b/data/org.gnome.Chess.appdata.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2013 Michael Catanzaro -->
-<component type="desktop">
- <id>gnome-chess.desktop</id>
+<component type="desktop-application">
+ <id>org.gnome.Chess</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>GNOME Chess</name>
@@ -23,11 +23,12 @@
</screenshot>
</screenshots>
<url type="homepage">https://wiki.gnome.org/Apps/Chess</url>
- <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-chess</url>
+ <url type="bugtracker">https://gitlab.gnome.org/GNOME/gnome-chess/issues/</url>
<url type="donation">http://www.gnome.org/friends/</url>
<url type="help">https://help.gnome.org/users/gnome-chess/stable/</url>
<url type="translate">https://wiki.gnome.org/TranslationProject</url>
<update_contact>mcatanzaro_at_gnome.org</update_contact>
+ <launchable type="desktop-id">org.gnome.Chess.desktop</launchable>
<project_group>GNOME</project_group>
<kudos>
<kudo>AppMenu</kudo>
diff --git a/data/gnome-chess.desktop.in b/data/org.gnome.Chess.desktop.in
similarity index 96%
rename from data/gnome-chess.desktop.in
rename to data/org.gnome.Chess.desktop.in
index e05cee3..523a607 100644
--- a/data/gnome-chess.desktop.in
+++ b/data/org.gnome.Chess.desktop.in
@@ -11,5 +11,5 @@ Type=Application
Categories=GNOME;GTK;Game;BoardGame;
StartupNotify=true
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=gnome-chess
+Icon=org.gnome.Chess
MimeType=application/x-chess-pgn;
diff --git a/data/org.gnome.chess.gschema.xml b/data/org.gnome.Chess.gschema.xml
similarity index 87%
rename from data/org.gnome.chess.gschema.xml
rename to data/org.gnome.Chess.gschema.xml
index 02cf335..d966747 100644
--- a/data/org.gnome.chess.gschema.xml
+++ b/data/org.gnome.Chess.gschema.xml
@@ -1,38 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
- <enum id="org.gnome.chess.MoveFormat">
+ <enum id="org.gnome.Chess.MoveFormat">
<value value="0" nick="human"/>
<value value="1" nick="san"/>
<value value="2" nick="fan"/>
<value value="3" nick="lan"/>
</enum>
- <enum id="org.gnome.chess.PlayAs">
+ <enum id="org.gnome.Chess.PlayAs">
<value value="0" nick="white"/>
<value value="1" nick="black"/>
<value value="2" nick="alternate"/>
</enum>
- <enum id="org.gnome.chess.BoardSide">
+ <enum id="org.gnome.Chess.BoardSide">
<value value="0" nick="white"/>
<value value="1" nick="black"/>
<value value="2" nick="human"/>
<value value="3" nick="current"/>
</enum>
- <enum id="org.gnome.chess.Difficulty">
+ <enum id="org.gnome.Chess.Difficulty">
<value value="0" nick="easy"/>
<value value="1" nick="normal"/>
<value value="2" nick="hard"/>
</enum>
- <enum id="org.gnome.chess.ClockType">
+ <enum id="org.gnome.Chess.ClockType">
<value value="0" nick="simple"/>
<value value="1" nick="fischer"/>
<value value="2" nick="bronstein"/>
</enum>
- <schema id="org.gnome.chess" path="/org/gnome/chess/" gettext-domain="gnome-chess">
+ <schema id="org.gnome.Chess" path="/org/gnome/Chess/" gettext-domain="gnome-chess">
<key name="width" type="i">
<default>700</default>
<summary>The width of the window</summary>
@@ -73,12 +73,12 @@
<summary>The directory to open the load game dialog in</summary>
<description>The directory to open the load game dialog in</description>
</key>
- <key name="move-format" enum="org.gnome.chess.MoveFormat">
+ <key name="move-format" enum="org.gnome.Chess.MoveFormat">
<default>'human'</default>
<summary>The format to display moves in</summary>
<description>The format to display moves in</description>
</key>
- <key name="board-side" enum="org.gnome.chess.BoardSide">
+ <key name="board-side" enum="org.gnome.Chess.BoardSide">
<default>'human'</default>
<summary>The side of the board that is in the foreground</summary>
<description>The side of the board that is in the foreground</description>
@@ -88,7 +88,7 @@
<summary>The duration of a game in seconds (0 for no limit)</summary>
<description>The duration of a game in seconds (0 for no limit)</description>
</key>
- <key name="clock-type" enum="org.gnome.chess.ClockType">
+ <key name="clock-type" enum="org.gnome.Chess.ClockType">
<default>'simple'</default>
<summary>The type of clock (simple/fischer/bronstein)</summary>
<description>The type of clock (simple/fischer/bronstein)</description>
@@ -98,12 +98,12 @@
<summary>The timer increment set corresponding to clock type (1 second minimum)</summary>
<description>The timer increment set corresponding to clock type (1 second minimum)</description>
</key>
- <key name="play-as" enum="org.gnome.chess.PlayAs">
+ <key name="play-as" enum="org.gnome.Chess.PlayAs">
<default>'white'</default>
<summary>The board side to play as</summary>
<description>The board side to play as</description>
</key>
- <key name="last-played-as" enum="org.gnome.chess.PlayAs">
+ <key name="last-played-as" enum="org.gnome.Chess.PlayAs">
<default>'white'</default>
<summary>The last side the player played as</summary>
<description>This is needed when play-as is set to alternate. This should only be set to black or
white.</description>
@@ -113,7 +113,7 @@
<summary>The opponent player</summary>
<description>Can be 'human' (play against another human player), '' (use the first available chess
engine) or the name of a specific engine to play against</description>
</key>
- <key name="difficulty" enum="org.gnome.chess.Difficulty">
+ <key name="difficulty" enum="org.gnome.Chess.Difficulty">
<default>'easy'</default>
<summary>Difficulty of the opponent chess engine</summary>
<description>Difficulty of the opponent chess engine</description>
diff --git a/meson.build b/meson.build
index a628e4f..ba6419a 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@ project('gnome-chess', [ 'vala', 'c' ],
license: 'GPL3+',
meson_version: '>= 0.37',
)
-
+application_id = 'org.gnome.Chess'
gnome = import('gnome')
i18n = import('i18n')
diff --git a/org.gnome.Chess.json b/org.gnome.Chess.json
index 38de9ab..da5be3b 100644
--- a/org.gnome.Chess.json
+++ b/org.gnome.Chess.json
@@ -1,13 +1,10 @@
{
- "app-id": "org.gnome.chess",
+ "app-id": "org.gnome.Chess",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"command": "gnome-chess",
"tags": ["nightly"],
- "copy-icon": true,
- "rename-icon": "gnome-chess",
- "rename-desktop-file": "gnome-chess.desktop",
"desktop-file-name-prefix": "(Nightly) ",
"finish-args": [
/* X11 + XShm access */
@@ -18,9 +15,6 @@
"--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
- "build-options": {
- "cflags": "-O2 -g"
- },
"cleanup": ["/share/gnuchess", "/share/info", "/share/man"],
"modules": [
{
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2464856..b70f671 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/gnome-chess.appdata.xml.in
-data/gnome-chess.desktop.in
data/gnome-chess.ui
data/help-overlay.ui
-data/org.gnome.chess.gschema.xml
+data/org.gnome.Chess.appdata.xml.in
+data/org.gnome.Chess.desktop.in
+data/org.gnome.Chess.gschema.xml
data/preferences.ui
data/promotion-type-selector.ui
lib/chess-game.vala
diff --git a/src/chess.gresource.xml b/src/chess.gresource.xml
index 22228c7..d11b371 100644
--- a/src/chess.gresource.xml
+++ b/src/chess.gresource.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
- <gresource prefix="/org/gnome/chess/ui">
+ <gresource prefix="/org/gnome/Chess/ui">
<file preprocess="xml-stripblanks" alias="gnome-chess.ui">gnome-chess.ui</file>
<file preprocess="xml-stripblanks" alias="preferences.ui">preferences.ui</file>
<file preprocess="xml-stripblanks" alias="promotion-type-selector.ui">promotion-type-selector.ui</file>
</gresource>
- <gresource prefix="/org/gnome/chess/gtk">
+ <gresource prefix="/org/gnome/Chess/gtk">
<file preprocess="xml-stripblanks">help-overlay.ui</file>
</gresource>
</gresources>
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index e5a69f1..3a04d08 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -104,7 +104,7 @@ Copyright © 2015–2016 Sahil Sareen""";
private ChessApplication ()
{
- Object (application_id: "org.gnome.chess", flags: ApplicationFlags.HANDLES_OPEN);
+ Object (application_id: "org.gnome.Chess", flags: ApplicationFlags.HANDLES_OPEN);
add_main_option_entries (option_entries);
}
@@ -137,12 +137,12 @@ Copyright © 2015–2016 Sahil Sareen""";
{
base.startup ();
- settings = new Settings ("org.gnome.chess");
+ settings = new Settings ("org.gnome.Chess");
add_action_entries (app_entries, this);
set_accels_for_action ("app.help", {"F1"});
set_accels_for_action ("app.quit", {"<Primary>q", "<Primary>w"});
- Gtk.Builder builder = new Gtk.Builder.from_resource ("/org/gnome/chess/ui/gnome-chess.ui");
+ Gtk.Builder builder = new Gtk.Builder.from_resource ("/org/gnome/Chess/ui/gnome-chess.ui");
window = (Gtk.ApplicationWindow) builder.get_object ("gnome_chess_app");
window.set_default_size (settings.get_int ("width"), settings.get_int ("height"));
@@ -275,7 +275,7 @@ Copyright © 2015–2016 Sahil Sareen""";
public PieceType? show_promotion_type_selector ()
{
- Gtk.Builder promotion_type_selector_builder = new Gtk.Builder.from_resource
("/org/gnome/chess/ui/promotion-type-selector.ui");
+ Gtk.Builder promotion_type_selector_builder = new Gtk.Builder.from_resource
("/org/gnome/Chess/ui/promotion-type-selector.ui");
Gtk.Dialog promotion_type_selector_dialog = promotion_type_selector_builder.get_object
("dialog_promotion_type_selector") as Gtk.Dialog;
promotion_type_selector_dialog.transient_for = window;
@@ -1709,7 +1709,7 @@ Copyright © 2015–2016 Sahil Sareen""";
return;
}
- Gtk.Builder preferences_builder = new Gtk.Builder.from_resource
("/org/gnome/chess/ui/preferences.ui");
+ Gtk.Builder preferences_builder = new Gtk.Builder.from_resource
("/org/gnome/Chess/ui/preferences.ui");
preferences_dialog = (Gtk.Dialog) preferences_builder.get_object ("preferences");
preferences_dialog.transient_for = window;
@@ -2202,7 +2202,7 @@ Copyright © 2015–2016 Sahil Sareen""";
about_dialog.artists = artists;
about_dialog.translator_credits = _("translator-credits");
about_dialog.website = "https://wiki.gnome.org/Apps/Chess";
- about_dialog.logo_icon_name = "gnome-chess";
+ about_dialog.logo_icon_name = "org.gnome.Chess";
about_dialog.response.connect (about_response_cb);
about_dialog.show ();
}
@@ -2480,7 +2480,7 @@ Copyright © 2015–2016 Sahil Sareen""";
Intl.textdomain (GETTEXT_PACKAGE);
Environment.set_application_name (_("Chess"));
- Gtk.Window.set_default_icon_name ("gnome-chess");
+ Gtk.Window.set_default_icon_name ("org.gnome.Chess");
return new ChessApplication ().run (args);
}
diff --git a/src/meson.build b/src/meson.build
index 67b87e5..98704b4 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,6 +1,6 @@
# The resource file
resource_files = files('chess.gresource.xml')
-resources = gnome.compile_resources('org.gnome.chess', resource_files,
+resources = gnome.compile_resources(application_id, resource_files,
source_dir: '../data',
c_name: 'resources'
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]