[gnome-games] gnotski: Load images from standard data directory



commit 93755daae9bd4f12f62d90944229b6b19c44117d
Author: Robert Ancell <robert ancell canonical com>
Date:   Sun Jan 1 13:21:12 2012 +1100

    gnotski: Load images from standard data directory

 gnotski/data/Makefile.am |    2 +-
 gnotski/src/Makefile.am  |    1 +
 gnotski/src/gnotski.c    |    4 +---
 3 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gnotski/data/Makefile.am b/gnotski/data/Makefile.am
index 524b1dc..6b9f6b1 100644
--- a/gnotski/data/Makefile.am
+++ b/gnotski/data/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = icons
 
-pixmapdir = $(pkgdatadir)/gnotski/pixmaps
+pixmapdir = $(datadir)/gnotski
 pixmap_DATA = \
 	gnotski.svg
 
diff --git a/gnotski/src/Makefile.am b/gnotski/src/Makefile.am
index 32c3b7f..0248ba4 100644
--- a/gnotski/src/Makefile.am
+++ b/gnotski/src/Makefile.am
@@ -9,6 +9,7 @@ gnotski_CPPFLAGS = \
 	$(AM_CPPFLAGS)
 
 gnotski_CFLAGS = \
+	-DDATA_DIRECTORY=\"$(datadir)/gnotski\" \
 	$(GTK_CFLAGS)	\
 	$(AM_CFLAGS)
 		
diff --git a/gnotski/src/gnotski.c b/gnotski/src/gnotski.c
index 3d650c8..9e5b676 100644
--- a/gnotski/src/gnotski.c
+++ b/gnotski/src/gnotski.c
@@ -1079,12 +1079,10 @@ load_solved_state (void)
 void
 load_image (void)
 {
-  const char *dname;
   char *path;
   GError *error = NULL;
 
-  dname = games_runtime_get_directory (GAMES_RUNTIME_GAME_PIXMAP_DIRECTORY);
-  path = g_build_filename (dname, "gnotski.svg", NULL);
+  path = g_build_filename (DATA_DIRECTORY, "gnotski.svg", NULL);
   tiles_preimage = games_preimage_new_from_file (path, &error);
   g_free (path);
 



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