gnome-games r8253 - trunk/same-gnome
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8253 - trunk/same-gnome
- Date: Tue, 4 Nov 2008 14:25:56 +0000 (UTC)
Author: chpe
Date: Tue Nov 4 14:25:55 2008
New Revision: 8253
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8253&view=rev
Log:
Remove directory defines from CPPFLAGS to ensure they're not used, and replace remaining uses of the directory defines, if any, with games-runtime lookups. Prettify the Makefile.am in the process, and make libgames-support includes consistent.
Modified:
trunk/same-gnome/Makefile.am
trunk/same-gnome/drawing.c
trunk/same-gnome/ui.c
Modified: trunk/same-gnome/Makefile.am
==============================================================================
--- trunk/same-gnome/Makefile.am (original)
+++ trunk/same-gnome/Makefile.am Tue Nov 4 14:25:55 2008
@@ -2,8 +2,8 @@
NULL =
-pixmapdir = $(pkgdatadir)/same-gnome/themes/2.10
-pixmap_DATA = \
+themedir = $(pkgdatadir)/same-gnome/themes/2.10
+theme_DATA = \
planets.png \
stones.png \
$(NULL)
@@ -23,12 +23,7 @@
ui.h
same_gnome_CPPFLAGS = \
- -I$(top_srcdir) \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
- -DDATADIR="\"$(datadir)\"" \
- -DPIXMAPDIR="\"$(pixmapdir)\"" \
- -DMAPDIR="\"$(mapdir)\"" \
- -DTHEMEDIR=\""$(pixmapdir)"\"
+ -I$(top_srcdir) \
$(AM_CPPFLAGS)
same_gnome_CFLAGS = \
@@ -65,7 +60,7 @@
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
EXTRA_DIST = \
- $(pixmap_DATA) \
+ $(theme_DATA) \
$(schema_in_files) \
$(NULL)
Modified: trunk/same-gnome/drawing.c
==============================================================================
--- trunk/same-gnome/drawing.c (original)
+++ trunk/same-gnome/drawing.c Tue Nov 4 14:25:55 2008
@@ -14,6 +14,7 @@
#include <gtk/gtk.h>
#include <libgames-support/games-conf.h>
+#include <libgames-support/games-runtime.h>
#include "same-gnome.h"
@@ -319,7 +320,7 @@
if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
g_free (filename);
/* Then look in the system directory. */
- filename = g_build_filename (THEMEDIR, theme, NULL);
+ filename = g_build_filename (games_runtime_get_directory (GAMES_RUNTIME_GAME_THEME_DIRECTORY), THEME_VERSION, theme, NULL);
if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
/* Some old themes had a -sync just before the suffix. This was
* hidden from the user and has been eliminated from the names
@@ -339,7 +340,7 @@
if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
/* And finally fall back to the default. */
g_free (filename);
- filename = g_build_filename (THEMEDIR, DEFAULT_THEME, NULL);
+ filename = g_build_filename (games_runtime_get_directory (GAMES_RUNTIME_GAME_THEME_DIRECTORY), THEME_VERSION, DEFAULT_THEME, NULL);
}
}
}
Modified: trunk/same-gnome/ui.c
==============================================================================
--- trunk/same-gnome/ui.c (original)
+++ trunk/same-gnome/ui.c Tue Nov 4 14:25:55 2008
@@ -17,6 +17,7 @@
#include <libgames-support/games-help.h>
#include <libgames-support/games-scores-dialog.h>
#include <libgames-support/games-stock.h>
+#include <libgames-support/games-runtime.h>
#include "same-gnome.h"
@@ -279,6 +280,7 @@
GtkTreeSelection *selection;
GtkListStore *list;
GamesFileList *filelist;
+ char *themedir;
if (dialog) {
gtk_window_present (GTK_WINDOW (dialog));
@@ -313,10 +315,12 @@
current_theme_index = -1;
theme_index_counter = 0;
- filelist = games_file_list_new_images (THEMEDIR, localthemedir, NULL);
+ themedir = g_build_filename (games_runtime_get_directory (GAMES_RUNTIME_GAME_THEME_DIRECTORY), THEME_VERSION, NULL);
+ filelist = games_file_list_new_images (themedir, localthemedir, NULL);
games_file_list_transform_basename (filelist);
games_file_list_for_each (filelist, (GFunc) fill_list, list);
g_object_unref (filelist);
+ g_free (themedir);
listview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list));
g_object_unref (list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]