[gnome-nibbles] Use reverse-DNS notation for appdata and desktop file
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Use reverse-DNS notation for appdata and desktop file
- Date: Sat, 13 Feb 2016 02:16:57 +0000 (UTC)
commit aa180e0c9949218b85ca21cbcb21ba8cb171a021
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri Feb 12 19:57:59 2016 -0600
Use reverse-DNS notation for appdata and desktop file
I need to hardcode the prgname in libgames-support, to handle score
import, and the prgname needs to match the desktop file name. I don't
want to hardcode a name that we know will change in the future, so
change it now.
Note to anyone reading this commit: when renaming a desktop file, you
have to update the rename list in gnome-shell/js/ui/appFavorites.js. And
you have to rename the appdata file at the same time, even though you
really shouldn't need to, given that the appdata file has a field for
which to identify the desktop file....
And if I wasn't sufficiently clear up above, make sure the prgname
matches the desktop file! GLib sets it to match the name of the
application binary by default, which is not going to work if the desktop
file name does not match the binary anymore.
data/Makefile.am | 4 ++--
...ata.xml.in => org.gnome.Nibbles.appdata.xml.in} | 2 +-
...les.desktop.in => org.gnome.Nibbles.desktop.in} | 0
po/POTFILES.in | 4 ++--
src/gnome-nibbles.vala | 3 ++-
5 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 8106524..8b8b2fd 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,11 +1,11 @@
SUBDIRS = icons levels pix
desktopdir = $(datadir)/applications
-desktop_in_files = gnome-nibbles.desktop.in
+desktop_in_files = org.gnome.Nibbles.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
-appstream_in_files = gnome-nibbles.appdata.xml.in
+appstream_in_files = org.gnome.Nibbles.appdata.xml.in
appstream_XML = $(appstream_in_files:.appdata.xml.in=.appdata.xml)
@APPSTREAM_XML_RULES@
@INTLTOOL_XML_RULE@
diff --git a/data/gnome-nibbles.appdata.xml.in b/data/org.gnome.Nibbles.appdata.xml.in
similarity index 98%
rename from data/gnome-nibbles.appdata.xml.in
rename to data/org.gnome.Nibbles.appdata.xml.in
index c71ab63..24e4432 100644
--- a/data/gnome-nibbles.appdata.xml.in
+++ b/data/org.gnome.Nibbles.appdata.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2013 Michael Catanzaro -->
<component type="desktop">
- <id>gnome-nibbles.desktop</id>
+ <id>org.gnome.Nibbles.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+ and CC-BY-SA-3.0</project_license>
<_name>GNOME Nibbles</_name>
diff --git a/data/gnome-nibbles.desktop.in b/data/org.gnome.Nibbles.desktop.in
similarity index 100%
rename from data/gnome-nibbles.desktop.in
rename to data/org.gnome.Nibbles.desktop.in
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6c389d0..63ea370 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,10 +2,10 @@
# Please keep this file in alphabetical order.
[encoding: UTF-8]
[type: gettext/glade]data/controls-grid.ui
-data/gnome-nibbles.appdata.xml.in
-data/gnome-nibbles.desktop.in
[type: gettext/glade]data/nibbles-menus.ui
[type: gettext/glade]data/nibbles.ui
+data/org.gnome.Nibbles.appdata.xml.in
+data/org.gnome.Nibbles.desktop.in
data/org.gnome.nibbles.gschema.xml
[type: gettext/glade]data/player-score-box.ui
[type: gettext/glade]data/preferences-dialog.ui
diff --git a/src/gnome-nibbles.vala b/src/gnome-nibbles.vala
index 697f8e4..9f80b32 100644
--- a/src/gnome-nibbles.vala
+++ b/src/gnome-nibbles.vala
@@ -104,7 +104,8 @@ public class Nibbles : Gtk.Application
public Nibbles ()
{
- Object (application_id: "org.gnome.nibbles", flags: ApplicationFlags.FLAGS_NONE);
+ Object (application_id: "org.gnome.Nibbles", flags: ApplicationFlags.FLAGS_NONE);
+ Environment.set_prgname ("org.gnome.Nibbles");
add_main_option_entries (option_entries);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]