[gnome-games] iagno: Install data files into standard location
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] iagno: Install data files into standard location
- Date: Sat, 31 Dec 2011 07:52:16 +0000 (UTC)
commit a467fa76bd7cda42ebeaf6ed3e2129e328c4d94b
Author: Robert Ancell <robert ancell canonical com>
Date: Sat Dec 31 18:43:15 2011 +1100
iagno: Install data files into standard location
iagno/data/Makefile.am | 6 +++---
iagno/src/Makefile.am | 1 +
iagno/src/config.vapi | 3 ++-
iagno/src/iagno.vala | 6 ++----
4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/iagno/data/Makefile.am b/iagno/data/Makefile.am
index d09b379..e7c0c6c 100644
--- a/iagno/data/Makefile.am
+++ b/iagno/data/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = icons
-pixmapdir = $(pkgdatadir)/iagno/pixmaps
-pixmap_DATA = \
+themedir = $(datadir)/iagno/themes
+theme_DATA = \
sun_and_star.svg \
black_and_white.svg
@@ -17,7 +17,7 @@ gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
man_MANS = iagno.6
EXTRA_DIST = \
- $(pixmap_DATA) \
+ $(theme_DATA) \
$(gsettings_in_file) \
$(man_MANS)
diff --git a/iagno/src/Makefile.am b/iagno/src/Makefile.am
index 95a3133..a5d890a 100644
--- a/iagno/src/Makefile.am
+++ b/iagno/src/Makefile.am
@@ -11,6 +11,7 @@ iagno_CFLAGS = \
-I$(top_srcdir)/libgames-support \
-DVERSION=\"$(VERSION)\" \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
+ -DDATA_DIRECTORY=\"$(datadir)/iagno\" \
$(GTK_CFLAGS)
iagno_VALAFLAGS = \
diff --git a/iagno/src/config.vapi b/iagno/src/config.vapi
index 6477226..c0c89fc 100644
--- a/iagno/src/config.vapi
+++ b/iagno/src/config.vapi
@@ -1,2 +1,3 @@
public const string VERSION;
-public const string GETTEXT_PACKAGE;
\ No newline at end of file
+public const string GETTEXT_PACKAGE;
+public const string DATA_DIRECTORY;
diff --git a/iagno/src/iagno.vala b/iagno/src/iagno.vala
index ebf2276..a7017e1 100644
--- a/iagno/src/iagno.vala
+++ b/iagno/src/iagno.vala
@@ -163,8 +163,7 @@ public class Iagno : Gtk.Application
private GnomeGamesSupport.Preimage? load_theme_texture (string filename, bool fail_on_error = false)
{
- var pixmap_directory = GnomeGamesSupport.runtime_get_directory (GnomeGamesSupport.RuntimeDirectory.GAME_PIXMAP_DIRECTORY);
- var path = Path.build_filename (pixmap_directory, filename);
+ var path = Path.build_filename (DATA_DIRECTORY, "themes", filename);
try
{
return new GnomeGamesSupport.Preimage.from_file (path);
@@ -560,8 +559,7 @@ public class Iagno : Gtk.Application
label = new Gtk.Label.with_mnemonic (_("_Tile set:"));
hbox.pack_start (label, false, false, 0);
- var dir = GnomeGamesSupport.runtime_get_directory (GnomeGamesSupport.RuntimeDirectory.GAME_PIXMAP_DIRECTORY);
- theme_file_list = new GnomeGamesSupport.FileList.images (dir, null);
+ theme_file_list = new GnomeGamesSupport.FileList.images (Path.build_filename (DATA_DIRECTORY, "themes"), null);
theme_file_list.transform_basename ();
var theme_combo = (Gtk.ComboBox) theme_file_list.create_widget (settings.get_string ("tileset"), GnomeGamesSupport.FILE_LIST_REMOVE_EXTENSION | GnomeGamesSupport.FILE_LIST_REPLACE_UNDERSCORES);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]