gnome-games r8029 - in trunk/gnect: data pixmaps src
- From: thomashpa svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8029 - in trunk/gnect: data pixmaps src
- Date: Wed, 15 Oct 2008 02:34:06 +0000 (UTC)
Author: thomashpa
Date: Wed Oct 15 02:34:06 2008
New Revision: 8029
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8029&view=rev
Log:
use games_runtime_get_directory instead of gnome_program_locate_file
Modified:
trunk/gnect/data/Makefile.am
trunk/gnect/pixmaps/Makefile.am
trunk/gnect/src/connect4.c
trunk/gnect/src/gfx.c
Modified: trunk/gnect/data/Makefile.am
==============================================================================
--- trunk/gnect/data/Makefile.am (original)
+++ trunk/gnect/data/Makefile.am Wed Oct 15 02:34:06 2008
@@ -1,6 +1,6 @@
NULL =
-velenadir = $(datadir)/gnect
+velenadir = $(datadir)/gnome-games/gnect
velena_DATA = white_ob.cn4.gz
Games_in_files = gnect.desktop.in.in
Modified: trunk/gnect/pixmaps/Makefile.am
==============================================================================
--- trunk/gnect/pixmaps/Makefile.am (original)
+++ trunk/gnect/pixmaps/Makefile.am Wed Oct 15 02:34:06 2008
@@ -1,4 +1,4 @@
-pixmapdir = $(datadir)/pixmaps/gnect
+pixmapdir = $(datadir)/gnome-games/gnect/pixmaps
pixmap_DATA = \
tileset_50x50_sunspot.svg \
Modified: trunk/gnect/src/connect4.c
==============================================================================
--- trunk/gnect/src/connect4.c (original)
+++ trunk/gnect/src/connect4.c Wed Oct 15 02:34:06 2008
@@ -23,6 +23,7 @@
*/
+#include <config.h>
#include <stdio.h>
#include <string.h>
@@ -33,13 +34,13 @@
#include <unistd.h>
#include <zlib.h>
-#include <gnome.h>
+#include <gtk/gtk.h>
+
+#include <libgames-support/games-runtime.h>
#include "connect4.h"
#include "pnsearch.h"
#include "proto.h"
-
-#include "config.h"
#include "main.h"
#define PLAYER1 0
@@ -110,10 +111,9 @@
long ob_size, len;
FILE *h1;
short x;
- char *tmp = g_strconcat ("gnect/", WHITE_BOOK, NULL);
- char *bookdata =
- gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_DATADIR, tmp,
- FALSE, NULL);
+ char *tmp = games_runtime_get_directory (GAMES_RUNTIME_GAME_DATA_DIRECTORY);
+ char *bookdata = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", tmp, WHITE_BOOK);
+
g_free (tmp);
if (!g_file_test (bookdata, G_FILE_TEST_EXISTS)) {
@@ -172,6 +172,8 @@
gzclose (h1);
board->bbposit = 0;
+ g_free(bookdata);
+
}
Modified: trunk/gnect/src/gfx.c
==============================================================================
--- trunk/gnect/src/gfx.c (original)
+++ trunk/gnect/src/gfx.c Wed Oct 15 02:34:06 2008
@@ -24,8 +24,12 @@
-#include "config.h"
-#include <gnome.h>
+#include <config.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <libgames-support/games-runtime.h>
+
#include "main.h"
#include "theme.h"
#include "prefs.h"
@@ -276,9 +280,7 @@
GdkPixbuf *pb_tileset_tmp;
GdkPixbuf *pb_bground_tmp = NULL;
- dname = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP,
- APPNAME, FALSE, NULL);
-
+ dname = games_runtime_get_directory (GAMES_RUNTIME_GAME_PIXMAP_DIRECTORY);
/* Try the theme pixmaps, fallback to the default and then give up */
while (TRUE) {
fname = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", dname,
@@ -320,7 +322,6 @@
}
g_free (fname);
}
-
g_free (dname);
if (pb_bground_raw)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]