Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog37
-rw-r--r--Makefile.am5
-rw-r--r--README.mingw6
-rw-r--r--boards/boardicons/book.pngbin1766 -> 1074 bytes
-rw-r--r--boards/boardicons/computer.pngbin9070 -> 2852 bytes
-rw-r--r--boards/boardicons/discovery.pngbin8401 -> 3585 bytes
-rw-r--r--boards/boardicons/experience.pngbin8270 -> 2340 bytes
-rw-r--r--boards/boardicons/fun.pngbin5176 -> 1935 bytes
-rw-r--r--boards/boardicons/puzzles.pngbin5956 -> 2566 bytes
-rw-r--r--boards/skins/gartoon/gcompris-about.pngbin63987 -> 19233 bytes
-rw-r--r--boards/skins/gartoon/gcomprislogo.pngbin9546 -> 7640 bytes
-rw-r--r--config.h.mingw22
-rw-r--r--configure.in1
-rwxr-xr-xnsis/gcompris-intro.bmpbin174054 -> 174054 bytes
-rw-r--r--src/boards/chess.c167
-rw-r--r--src/boards/clickgame.c64
-rw-r--r--src/gcompris/Makefile.mingw13
-rw-r--r--src/gcompris/about.c34
-rw-r--r--src/gcompris/gcompris.c5
-rw-r--r--src/gcompris/images_selector.c13
-rw-r--r--src/gcompris/skin.c50
21 files changed, 232 insertions, 185 deletions
diff --git a/ChangeLog b/ChangeLog
index 1638606..bb8d2d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2006-09-17 Bruno coudoin <bruno.coudoin@free.fr>
+
+ - Minor resizing of some icons do make them appear smother
+ - Changed gcompris logo to newer design from Franck.
+ - Fixed clickgame to work again on windows.
+
+ * Makefile.am:
+ * README.mingw:
+ * boards/boardicons/book.png:
+ * boards/boardicons/computer.png:
+ * boards/boardicons/discovery.png:
+ * boards/boardicons/experience.png:
+ * boards/boardicons/fun.png:
+ * boards/boardicons/puzzles.png:
+ * boards/skins/gartoon/gcompris-about.png:
+ * boards/skins/gartoon/gcomprislogo.png:
+ * config.h.mingw:
+ * configure.in:
+ * nsis/gcompris-intro.bmp:
+ * src/boards/chess.c: (start_board), (chess_next_level),
+ (chess_destroy_all_items), (chess_create_item), (move_piece_to),
+ (hightlight_possible_moves), (item_event), (engine_local_destroy),
+ (engine_local_cb), (engine_local_err_cb), (start_child),
+ (write_child): nothing, just reindent.
+ * src/boards/clickgame.c: (clickgame_start),
+ (clickgame_next_level), (clickgame_animate_item),
+ (clickgame_destroy_items), (clickgame_destroy_all_items),
+ (clickgame_create_item), (clickgame_add_new_item), (item_event),
+ (load_random_pixmap):
+ * src/gcompris/Makefile.mingw:
+ * src/gcompris/about.c: (gc_about_start), (gc_about_stop):
+ * src/gcompris/gcompris.c: (setup_window):
+ * src/gcompris/images_selector.c: (display_image),
+ (display_image_set), (parseImage):
+ * src/gcompris/skin.c: (gc_skin_image_get), (gc_skin_pixmap_load),
+ (gc_skin_setup_vars), (skin_xml_load), (gc_skin_load):
+
2006-09-15 Bruno coudoin <bruno.coudoin@free.fr>
* README.mingw: minor update
diff --git a/Makefile.am b/Makefile.am
index 1c38f65..4db9763 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,7 +30,8 @@ EXTRA_DIST = \
intltool-update.in \
gnome2-macros \
README.mingw README.translators README.windows \
- config.h.mingw Makefile.mingw global_win32.mak gcompris.ico gcompris-installer.nsi
+ config.h.mingw.in Makefile.mingw global_win32.mak gcompris.ico gcompris-uninstall.ico \
+ gcompris-installer.nsi
distcore = $(PACKAGE)-core-$(VERSION)
@@ -49,7 +50,7 @@ dist-hook:
fi
-CLEANFILES = core-translation-report gcompris.desktop gcompris-edit.desktop gcompris.spec
+CLEANFILES = core-translation-report gcompris.desktop gcompris-edit.desktop gcompris.spec config.h.mingw
clean-local:
rm -f intltool-extract intltool-merge intltool-update
diff --git a/README.mingw b/README.mingw
index f5c2465..c21ed60 100644
--- a/README.mingw
+++ b/README.mingw
@@ -64,9 +64,9 @@ GNUCHESS_TOP := /gnuchess
* Now on the windows system:
* Get a tarball or CVS snapshot of gcompris.
* untar the gcompris-win-prepack.tar.gz in it
-* run make -f Makefile.mingw from gcompris's top-level directory. This will take a long time.
-* run make -f Makefile.mingw prepack to include all necessary libraries in the installer directory
-* run make -f Makefile.mingw install to include the generated code in the installer directory
+* run: make -f Makefile.mingw from gcompris's top-level directory. This will take a long time.
+* run: make -f Makefile.mingw prepack to include all necessary libraries in the installer directory
+* run: make -f Makefile.mingw install to include the generated code in the installer directory
the win32-install-dir should contain anything needed to run and package GCompris.
diff --git a/boards/boardicons/book.png b/boards/boardicons/book.png
index 6ccef16..c0b7a3b 100644
--- a/boards/boardicons/book.png
+++ b/boards/boardicons/book.png
Binary files differ
diff --git a/boards/boardicons/computer.png b/boards/boardicons/computer.png
index 7a4ea3f..910d625 100644
--- a/boards/boardicons/computer.png
+++ b/boards/boardicons/computer.png
Binary files differ
diff --git a/boards/boardicons/discovery.png b/boards/boardicons/discovery.png
index c714418..1be4919 100644
--- a/boards/boardicons/discovery.png
+++ b/boards/boardicons/discovery.png
Binary files differ
diff --git a/boards/boardicons/experience.png b/boards/boardicons/experience.png
index a26fbd2..18fc63f 100644
--- a/boards/boardicons/experience.png
+++ b/boards/boardicons/experience.png
Binary files differ
diff --git a/boards/boardicons/fun.png b/boards/boardicons/fun.png
index fd9be6f..49b78a9 100644
--- a/boards/boardicons/fun.png
+++ b/boards/boardicons/fun.png
Binary files differ
diff --git a/boards/boardicons/puzzles.png b/boards/boardicons/puzzles.png
index 396f694..5a7a113 100644
--- a/boards/boardicons/puzzles.png
+++ b/boards/boardicons/puzzles.png
Binary files differ
diff --git a/boards/skins/gartoon/gcompris-about.png b/boards/skins/gartoon/gcompris-about.png
index 104f34d..96a1f91 100644
--- a/boards/skins/gartoon/gcompris-about.png
+++ b/boards/skins/gartoon/gcompris-about.png
Binary files differ
diff --git a/boards/skins/gartoon/gcomprislogo.png b/boards/skins/gartoon/gcomprislogo.png
index a3487a0..9ee51dd 100644
--- a/boards/skins/gartoon/gcomprislogo.png
+++ b/boards/skins/gartoon/gcomprislogo.png
Binary files differ
diff --git a/config.h.mingw b/config.h.mingw
index da3e78f..1ec39d9 100644
--- a/config.h.mingw
+++ b/config.h.mingw
@@ -1,6 +1,9 @@
/* config.h. Generated by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
+/* Version number of package */
+#define VERSION "8.0BETA5"
+
/* Supported languages */
#define ALL_LINGUAS "am ar az bg ca cs da de el en_CA en_GB es et fi fr ga gu he hi hr hu it lt mk ml ms nl nb nn pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv tr wa zh_CN"
@@ -16,9 +19,6 @@
/* Gettext package name */
#define GETTEXT_PACKAGE "gcompris"
-/* System icons directory */
-#define SYSTEM_ICONDIR "share/pixmaps"
-
/* Defines where GNU Chess resides on the system */
#define GNUCHESS "gnuchess.exe"
@@ -101,7 +101,10 @@
#define PACKAGE_BUGREPORT ""
/* Gcompris data directory */
-#define PACKAGE_DATA_DIR "share/gcompris/boards"
+#define PACKAGE_DATA_DIR "share"
+
+/* Gcompris plugins directory (not needed, static compile on windows) */
+#define PACKAGE_CLIB_DIR ""
/* Gcompris help directory */
#define PACKAGE_HELP_DIR "share/gnome/help/gcompris"
@@ -112,9 +115,6 @@
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
-/* Gcompris sounds directory */
-#define PACKAGE_SOUNDS_DIR "share/gcompris/boards/sounds"
-
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
@@ -124,14 +124,6 @@
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
-/* Gcompris plugins directory */
-#define PLUGIN_DIR "share/lib/gcompris"
-
-/* Gcompris python plugins directory */
-#define PYTHON_PLUGIN_DIR "share/gcompris/python"
-
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* Version number of package */
-#define VERSION "7.4BETA2"
diff --git a/configure.in b/configure.in
index 48ae133..c02ab47 100644
--- a/configure.in
+++ b/configure.in
@@ -457,6 +457,7 @@ AC_SUBST(CFLAGS)
dnl Autoconf output
AC_OUTPUT([ gcompris.spec
Makefile.mingw
+config.h.mingw
gcompris-installer.nsi
Makefile
autopackage/Makefile
diff --git a/nsis/gcompris-intro.bmp b/nsis/gcompris-intro.bmp
index 7d5b1d2..751fb08 100755
--- a/nsis/gcompris-intro.bmp
+++ b/nsis/gcompris-intro.bmp
Binary files differ
diff --git a/src/boards/chess.c b/src/boards/chess.c
index 0992b51..1358d82 100644
--- a/src/boards/chess.c
+++ b/src/boards/chess.c
@@ -177,16 +177,25 @@ static void pause_board (gboolean pause)
board_paused = pause;
}
+void gnuchess_died(int signum)
+{
+ if(signum == SIGTRAP)
+ {
+ gc_dialog(_("Error: The external program gnuchess died unexpectingly"), gc_board_end);
+ }
+}
+
/*
*/
static void start_board (GcomprisBoard *agcomprisBoard)
{
-
-#ifndef WIN32
+
+ signal(SIGTRAP, gnuchess_died);
+#ifndef WIN32
if (!g_file_test (GNUCHESS, G_FILE_TEST_EXISTS)) {
-
+
gc_dialog(_("Error: The external program gnuchess is mandatory\nto play chess in gcompris.\nFind this program on http://www.rpmfind.net or in your\nGNU/Linux distribution\nAnd check it is located here: "GNUCHESS), gc_board_end);
-
+
return;
}
#endif
@@ -195,7 +204,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
{
gcomprisBoard=agcomprisBoard;
-
+
/* Default mode */
if(!gcomprisBoard->mode)
gameType=COMPUTER;
@@ -205,12 +214,12 @@ static void start_board (GcomprisBoard *agcomprisBoard)
gameType=PARTYEND;
else if(g_strncasecmp(gcomprisBoard->mode, "movelearn", 1)==0)
gameType=MOVELEARN;
-
+
gcomprisBoard->level=1;
gcomprisBoard->maxlevel=1;
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=1; /* Go to next level after this number of 'play' */
-
+
switch(gameType)
{
case PARTYEND:
@@ -227,21 +236,21 @@ static void start_board (GcomprisBoard *agcomprisBoard)
gc_dialog(_("Error: The external program gnuchess is mandatory\nto play chess in gcompris.\nFind this program on http://www.rpmfind.net or in your\nGNU/Linux distribution\nAnd check it is in "GNUCHESS), gc_board_end);
return;
}
-
+
read_cb = g_io_add_watch (read_chan, G_IO_IN,
engine_local_cb, NULL);
err_cb = g_io_add_watch (read_chan, G_IO_HUP,
engine_local_err_cb, NULL);
-
+
write_child (write_chan, "xboard\n");
write_child (write_chan, "protover 2\n");
write_child (write_chan, "post\n");
write_child (write_chan, "easy\n");
write_child (write_chan, "level 100 1 0\n");
write_child (write_chan, "depth 1\n");
-
+
chess_next_level();
-
+
gamewon = FALSE;
pause_board(FALSE);
}
@@ -301,7 +310,7 @@ static void chess_next_level()
gchar *img;
img = gc_skin_image_get("gcompris-bg.jpg");
- gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
+ gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
img);
g_free(img);
@@ -323,8 +332,8 @@ static void chess_next_level()
break;
}
/* Init our internal chessboard */
- for (rank = 1; rank <= 8; rank++) {
- for (square = A1 + ((rank - 1) * 10);
+ for (rank = 1; rank <= 8; rank++) {
+ for (square = A1 + ((rank - 1) * 10);
square <= H1 + ((rank - 1) * 10);
square++) {
@@ -335,10 +344,10 @@ static void chess_next_level()
chessboard[square] = gsquare;
chessboard[square]->piece_item = NULL;
chessboard[square]->square = square;
-
+
}
- }
-
+ }
+
/* Try the next level */
chess_create_item(gnome_canvas_root(gcomprisBoard->canvas));
}
@@ -362,11 +371,11 @@ static void chess_destroy_all_items()
position = NULL;
- for (rank = 1; rank <= 8; rank++) {
- for (square = A1 + ((rank - 1) * 10);
+ for (rank = 1; rank <= 8; rank++) {
+ for (square = A1 + ((rank - 1) * 10);
square <= H1 + ((rank - 1) * 10);
square++) {
-
+
if(chessboard[square]!=NULL)
{
g_free(chessboard[square]);
@@ -396,17 +405,17 @@ static GnomeCanvasItem *chess_create_item(GnomeCanvasGroup *parent)
NULL));
- for (rank = 1; rank <= 8; rank++) {
- for (square = A1 + ((rank - 1) * 10);
+ for (rank = 1; rank <= 8; rank++) {
+ for (square = A1 + ((rank - 1) * 10);
square <= H1 + ((rank - 1) * 10);
square++) {
int x,y;
-
+
x = square % 10 - 1;
y = square / 10 - 2;
color=((x+y)%2?BLACK_COLOR:WHITE_COLOR);
-
+
item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_rect_get_type (),
"x1", (double) CHESSBOARD_X + (x * SQUARE_WIDTH),
@@ -430,10 +439,10 @@ static GnomeCanvasItem *chess_create_item(GnomeCanvasGroup *parent)
need_slash = FALSE;
/* Display the pieces */
- for (rank = 8; rank >= 1; rank--) {
- for (square = A1 + ((rank - 1) * 10);
+ for (rank = 8; rank >= 1; rank--) {
+ for (square = A1 + ((rank - 1) * 10);
square <= H1 + ((rank - 1) * 10);
- square++)
+ square++)
{
GdkPixbuf *pixmap = NULL;
char *str;
@@ -462,7 +471,7 @@ static GnomeCanvasItem *chess_create_item(GnomeCanvasGroup *parent)
{
if( (white_side && BPIECE(piece)) ||
- (!white_side && WPIECE(piece)) )
+ (!white_side && WPIECE(piece)) )
{
white_side = !white_side;
// write_child (write_chan, "c\n");
@@ -500,25 +509,25 @@ static GnomeCanvasItem *chess_create_item(GnomeCanvasGroup *parent)
str = g_strdup_printf("chess/B%c.png", piece_to_ascii(piece));
else
str = g_strdup_printf("chess/W%c.png", piece_to_ascii(piece));
-
+
pixmap = gc_pixmap_load(str);
// g_warning("loading piece %s\n", str);
g_free(str);
item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap,
+ "pixbuf", pixmap,
"x", (double)CHESSBOARD_X + (x * SQUARE_WIDTH) +
(guint)((SQUARE_WIDTH-gdk_pixbuf_get_width(pixmap))/2),
"y", (double) CHESSBOARD_Y + ((7-y) * SQUARE_HEIGHT) +
(guint)((SQUARE_HEIGHT-gdk_pixbuf_get_height(pixmap))/2),
NULL);
-
+
chessboard[square]->piece_item = item;
if(WPIECE(piece))
- gtk_signal_connect(GTK_OBJECT(item), "event",
+ gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) item_event, NULL);
else
- gtk_signal_connect(GTK_OBJECT(item), "event",
+ gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) item_event_black, NULL);
gdk_pixbuf_unref(pixmap);
@@ -606,7 +615,7 @@ static void move_piece_to(Square from, Square to)
double ofset_x, ofset_y;
double x1, y1, x2, y2;
Piece piece = NONE;
-
+
g_warning("move_piece_to from=%d to=%d\n", from, to);
@@ -625,7 +634,7 @@ static void move_piece_to(Square from, Square to)
{
if (to & 128) {
piece = ((to & 127) >> 3 ) + WP - 1;
- to = (to & 7) + A8;
+ to = (to & 7) + A8;
printf(" Promoting white piece to %d\n", piece);
}
}
@@ -648,14 +657,14 @@ static void move_piece_to(Square from, Square to)
x = to % 10;
y = to / 10 -1;
-
+
g_warning(" move_piece_to to x=%d y=%d\n", x, y);
dest_square = chessboard[to];
/* Show the moved piece */
gnome_canvas_item_set(dest_square->square_item,
- "outline_color",
+ "outline_color",
(BPIECE(position->square[to])?"red":"blue"),
NULL);
@@ -700,12 +709,12 @@ static void move_piece_to(Square from, Square to)
str = g_strdup_printf("chess/B%c.png", piece_to_ascii(piece));
else
str = g_strdup_printf("chess/W%c.png", piece_to_ascii(piece));
-
+
pixmap = gc_pixmap_load(str);
g_free(str);
g_warning("loading piece %c\n", piece_to_ascii(piece));
gnome_canvas_item_set (dest_square->piece_item,
- "pixbuf", pixmap,
+ "pixbuf", pixmap,
NULL);
}
@@ -751,15 +760,15 @@ void hightlight_possible_moves(GSquare *gsquare)
else
position_set_color_to_move(position, BLACK);
- for (rank = 1; rank <= 8; rank++) {
- for (square = A1 + ((rank - 1) * 10);
+ for (rank = 1; rank <= 8; rank++) {
+ for (square = A1 + ((rank - 1) * 10);
square <= H1 + ((rank - 1) * 10);
square++) {
square_test = position_move_normalize (position, gsquare->square, chessboard[square]->square);
- if (square_test)
+ if (square_test)
{
color=((rank+square)%2?BLACK_COLOR_H:WHITE_COLOR_H);
@@ -777,7 +786,7 @@ void hightlight_possible_moves(GSquare *gsquare)
"outline_color", "black",
NULL);
}
- }
+ }
}
/* Set back the current color to move */
@@ -788,7 +797,7 @@ void hightlight_possible_moves(GSquare *gsquare)
"outline_color",
(BPIECE(position->square[gsquare->square])?"red":"blue"),
NULL);
-
+
}
/* ==================================== */
@@ -823,11 +832,11 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
x = item_x;
y = item_y;
-
+
fleur = gdk_cursor_new(GDK_FLEUR);
gnome_canvas_item_raise_to_top(item);
gc_canvas_item_grab(item,
- GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
fleur,
event->button.time);
@@ -838,7 +847,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
}
break;
case GDK_MOTION_NOTIFY:
- if (dragging && (event->motion.state & GDK_BUTTON1_MASK))
+ if (dragging && (event->motion.state & GDK_BUTTON1_MASK))
{
new_x = item_x;
new_y = item_y;
@@ -848,9 +857,9 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
y = new_y;
}
break;
-
+
case GDK_BUTTON_RELEASE:
- if(dragging)
+ if(dragging)
{
guint x, y;
double ofset_x, ofset_y;
@@ -859,7 +868,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
Square to;
to = get_square_from_coord(event->button.x, event->button.y);
- g_warning("===== Source square = %d Destination square = %d\n", gsquare->square,
+ g_warning("===== Source square = %d Destination square = %d\n", gsquare->square,
to);
to = position_move_normalize (position, gsquare->square, to);
@@ -878,21 +887,21 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
else
{
g_warning("====== MOVE from %d REFUSED\n", gsquare->square);
-
+
/* Find the ofset to move the piece back to where it was*/
gnome_canvas_item_get_bounds (item,
&x1,
&y1,
&x2,
&y2);
-
+
x = gsquare->square % 10;
y = gsquare->square / 10 -1;
-
+
ofset_x = (CHESSBOARD_X + SQUARE_WIDTH * (x-1)) - x1 + (SQUARE_WIDTH - (x2-x1))/2;
ofset_y = (CHESSBOARD_Y + SQUARE_HEIGHT * (8-y)) - y1 + (SQUARE_HEIGHT - (y2-y1))/2;
g_warning("ofset = x=%f y=%f\n", ofset_x, ofset_y);
-
+
gnome_canvas_item_move(item, ofset_x, ofset_y);
}
@@ -944,7 +953,7 @@ item_event_black(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
/*======================================================================*/
/*======================================================================*/
static void
-engine_local_destroy (GPid gnuchess_pid)
+engine_local_destroy (GPid gnuchess_pid)
{
g_warning("engine_local_destroy () \n");
@@ -955,7 +964,7 @@ engine_local_destroy (GPid gnuchess_pid)
g_io_channel_close (read_chan);
g_io_channel_unref (read_chan);
-
+
g_io_channel_close (write_chan);
g_io_channel_unref (write_chan);
@@ -970,7 +979,7 @@ engine_local_cb (GIOChannel *source,
{
static char buf[1024];
static char *b=buf;
-
+
char *p,*q;
gsize len;
GIOStatus status;
@@ -982,37 +991,37 @@ engine_local_cb (GIOChannel *source,
/* FIXME: Not sure what to do */
return FALSE;
}
-
+
if (len > 0) {
b[len] = 0;
b += len;
}
-
+
while (1) {
char tmp;
-
+
q = strchr (buf,'\n');
if (q == NULL) break;
tmp = *(q+1);
*(q+1) = '\0';
-
+
*q='\0';
*(q+1) = tmp;
-
+
g_warning("engine_local_cb read=%s\n", buf);
-
+
/* parse for NUMBER ... MOVE */
if (isdigit (*buf))
{
if ((p = strstr (buf, "...")))
{
Square from, to;
-
+
g_warning("computer number moves to %s\n", p+4);
-
+
if (san_to_move (position, p+4, &from, &to))
ascii_to_move (position, p+4, &from, &to);
-
+
position_move (position, from, to);
move_piece_to(from , to);
}
@@ -1037,7 +1046,7 @@ engine_local_cb (GIOChannel *source,
position_move (position, from, to);
move_piece_to(from , to);
}
-
+
/* parse for illegal move */
if (!strncmp ("Illegal move",buf,12))
{
@@ -1074,7 +1083,7 @@ engine_local_cb (GIOChannel *source,
memmove (buf, q+1, sizeof(buf) - ( q + 1 - buf));
b -= (q + 1 - buf);
}
-
+
return TRUE;
}
@@ -1084,7 +1093,7 @@ engine_local_err_cb (GIOChannel *source,
gpointer data)
{
g_error ("Local Engine connection died");
-
+
return FALSE;
}
@@ -1094,8 +1103,8 @@ engine_local_err_cb (GIOChannel *source,
*----------------------------------------*/
static gboolean
-start_child (char *cmd,
- GIOChannel **read_chan,
+start_child (char *cmd,
+ GIOChannel **read_chan,
GIOChannel **write_chan,
GPid *Child_Process)
{
@@ -1110,7 +1119,7 @@ start_child (char *cmd,
G_SPAWN_SEARCH_PATH,
NULL, NULL, Child_Process, &Child_In, &Child_Out,
&Child_Err, &gerror)) {
-
+
g_warning("Error message '%s'", gerror->message);
g_warning("Error code '%d'", gerror->code);
g_error_free (gerror);
@@ -1136,13 +1145,13 @@ start_child (char *cmd,
return(TRUE);
}
-static void
-write_child (GIOChannel *write_chan, char *format, ...)
+static void
+write_child (GIOChannel *write_chan, char *format, ...)
{
GIOError err;
va_list ap;
char *buf;
- gsize len;
+ gsize len;
va_start (ap, format);
@@ -1163,13 +1172,13 @@ write_child (GIOChannel *write_chan, char *format, ...)
* Not all data are read back using this method
*/
/*
-static void
-write_child (GIOChannel *write_chan, char *format, ...)
+static void
+write_child (GIOChannel *write_chan, char *format, ...)
{
GIOStatus err;
va_list ap;
gchar *buf;
- gsize len;
+ gsize len;
va_start (ap, format);
@@ -1179,7 +1188,7 @@ write_child (GIOChannel *write_chan, char *format, ...)
if (err != G_IO_STATUS_NORMAL)
g_warning ("Writing to child process failed");
else
- g_warning ("Wrote '%s' to gnuchess", buf);
+ g_warning ("Wrote '%s' to gnuchess", buf);
va_end (ap);
diff --git a/src/boards/clickgame.c b/src/boards/clickgame.c
index 3be4e58..efa8a3a 100644
--- a/src/boards/clickgame.c
+++ b/src/boards/clickgame.c
@@ -201,9 +201,9 @@ static void clickgame_start (GcomprisBoard *agcomprisBoard)
gcomprisBoard->level = 1;
gcomprisBoard->maxlevel=6;
gcomprisBoard->number_of_sublevel=10; /* Go to next level after this number of 'play' */
- gc_score_start(SCORESTYLE_NOTE,
- gcomprisBoard->width - 220,
- gcomprisBoard->height - 50,
+ gc_score_start(SCORESTYLE_NOTE,
+ gcomprisBoard->width - 220,
+ gcomprisBoard->height - 50,
gcomprisBoard->number_of_sublevel);
gc_bar_set(GC_BAR_LEVEL);
@@ -270,33 +270,33 @@ clickgame_config ()
/*-------------------------------------------------------------------------------*/
/* set initial values for the next level */
-static void clickgame_next_level()
+static void clickgame_next_level()
{
switch(gcomprisBoard->level)
{
case 1:
- gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
+ gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
"clickgame/nur00523.jpg");
break;
case 2:
- gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
+ gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
"clickgame/nur03006.jpg");
break;
case 3:
- gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
+ gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
"clickgame/nur03011.jpg");
break;
case 4:
- gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
+ gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
"clickgame/nur03010.jpg");
break;
case 5:
- gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
+ gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
"clickgame/nur03013.jpg");
break;
default:
- gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
+ gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
"clickgame/nur03505.jpg");
}
@@ -323,10 +323,10 @@ static void clickgame_animate_item(FishItem *fishitem)
if(fishitem->currentItem >= g_list_length(fishitem->item_list))
fishitem->currentItem=0;
- gnome_canvas_item_show((GnomeCanvasItem *)g_list_nth_data(fishitem->item_list,
+ gnome_canvas_item_show((GnomeCanvasItem *)g_list_nth_data(fishitem->item_list,
fishitem->currentItem));
- gnome_canvas_item_hide((GnomeCanvasItem *)g_list_nth_data(fishitem->item_list,
+ gnome_canvas_item_hide((GnomeCanvasItem *)g_list_nth_data(fishitem->item_list,
currentItem));
}
@@ -379,7 +379,7 @@ static void clickgame_destroy_items()
{
FishItem *fishitem;
- while(g_list_length(item2del_list)>0)
+ while(g_list_length(item2del_list)>0)
{
fishitem = g_list_nth_data(item2del_list, 0);
clickgame_destroy_item(fishitem);
@@ -391,7 +391,7 @@ static void clickgame_destroy_all_items()
{
FishItem *fishitem;
- while(g_list_length(item_list)>0)
+ while(g_list_length(item_list)>0)
{
fishitem = g_list_nth_data(item_list, 0);
clickgame_destroy_item(fishitem);
@@ -468,7 +468,7 @@ static FishItem *clickgame_create_item(GnomeCanvasGroup *parent)
x = (double) gcomprisBoard->width;
fishitem->speed=MIN(fishitem->speed, -1);
}
- else
+ else
{
x = (double) -gdk_pixbuf_get_width(pixmap)*imageZoom;
fishitem->speed=MAX(fishitem->speed, 1);
@@ -497,12 +497,12 @@ static FishItem *clickgame_create_item(GnomeCanvasGroup *parent)
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap2,
+ "pixbuf", pixmap2,
"x", 0.0,
"y", 0.0,
"width", (double) gdk_pixbuf_get_width(pixmap)*imageZoom,
"height", (double) gdk_pixbuf_get_height(pixmap)*imageZoom,
- "width_set", TRUE,
+ "width_set", TRUE,
"height_set", TRUE,
NULL);
gdk_pixbuf_unref(pixmap2);
@@ -511,7 +511,7 @@ static FishItem *clickgame_create_item(GnomeCanvasGroup *parent)
gnome_canvas_item_show(item);
else
gnome_canvas_item_hide(item);
-
+
fishitem->item_list = g_list_append (fishitem->item_list, item);
}
@@ -525,7 +525,7 @@ static FishItem *clickgame_create_item(GnomeCanvasGroup *parent)
return (fishitem);
}
-static void clickgame_add_new_item()
+static void clickgame_add_new_item()
{
setup_item (clickgame_create_item(gnome_canvas_root(gcomprisBoard->canvas)));
}
@@ -580,34 +580,34 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, FishItem *fishitem)
item_y = event->button.y;
gnome_canvas_item_w2i(item->parent, &item_x, &item_y);
- switch (event->type)
+ switch (event->type)
{
case GDK_BUTTON_PRESS:
- switch(event->button.button)
+ switch(event->button.button)
{
case 1:
if (event->button.state & GDK_SHIFT_MASK)
{
x = item_x;
y = item_y;
-
+
fleur = gdk_cursor_new(GDK_FLEUR);
gc_canvas_item_grab(item,
- GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
fleur,
event->button.time);
gdk_cursor_destroy(fleur);
dragging = TRUE;
}
- else
+ else
{
clickgame_destroy_item(fishitem);
gc_sound_play_ogg ("sounds/gobble.ogg", NULL);
-
+
gcomprisBoard->sublevel++;
gc_score_set(gcomprisBoard->sublevel);
-
+
if(gcomprisBoard->sublevel>=gcomprisBoard->number_of_sublevel) {
gamewon = TRUE;
clickgame_destroy_all_items();
@@ -663,19 +663,19 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, FishItem *fishitem)
break;
case GDK_MOTION_NOTIFY:
- if (dragging && (event->motion.state & GDK_BUTTON1_MASK))
+ if (dragging && (event->motion.state & GDK_BUTTON1_MASK))
{
new_x = item_x;
new_y = item_y;
-
+
gnome_canvas_item_move(item, new_x - x, new_y - y);
x = new_x;
y = new_y;
}
break;
-
+
case GDK_BUTTON_RELEASE:
- if(dragging)
+ if(dragging)
{
gc_canvas_item_ungrab(item, event->button.time);
dragging = FALSE;
@@ -685,7 +685,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, FishItem *fishitem)
default:
break;
}
-
+
return FALSE;
}
@@ -727,7 +727,7 @@ static void load_random_pixmap()
}
else
{
- pixmap = gc_pixmap_load (url);
+ pixmap = gc_pixmap_load (str, j-1);
if(pixmap) {
imagelist = g_list_append (imagelist, pixmap);
diff --git a/src/gcompris/Makefile.mingw b/src/gcompris/Makefile.mingw
index 7c946dc..bd1b026 100644
--- a/src/gcompris/Makefile.mingw
+++ b/src/gcompris/Makefile.mingw
@@ -30,7 +30,7 @@ CFLAGS =
DEFINES =
-LDFLAGS = -mwindows -mno-cygwin -mms-bitfields
+LDFLAGS = -mwindows -mno-cygwin -mms-bitfields
#-mconsole
#-mwindows
@@ -80,11 +80,14 @@ EXE_C_SRC = \
about.c \
anim.c \
bar.c \
+ binreloc.c \
board.c \
board_config.c \
bonus.c \
+ cache.c \
config.c \
cursor.c \
+ dialog.c \
file_selector.c \
gameutil.c \
gcompris.c \
@@ -92,11 +95,12 @@ EXE_C_SRC = \
gcompris_confirm.c \
gcompris_db.c \
gcompris_im.c \
- gcompris_files.c \
+ gc_net.c \
help.c \
images_selector.c \
log.c \
main.c \
+ menu.c \
pixbuf_util.c \
profile.c \
properties.c \
@@ -104,11 +108,12 @@ EXE_C_SRC = \
sdlplayer.c \
skin.c \
soundutil.c \
- timer.c
+ timer.c \
+ wordlist.c
RC_SRC = gcomprisrc.rc
-EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(RC_SRC:%.rc=%.o)
+EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(RC_SRC:%.rc=%.o)
##
## LIBRARIES
diff --git a/src/gcompris/about.c b/src/gcompris/about.c
index dbb7166..2edd3b1 100644
--- a/src/gcompris/about.c
+++ b/src/gcompris/about.c
@@ -89,7 +89,7 @@ void gc_about_start ()
x_start = (BOARDWIDTH - gdk_pixbuf_get_width(pixmap))/2;
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap,
+ "pixbuf", pixmap,
"x", (double) x_start,
"y", (double) y_start,
NULL);
@@ -98,7 +98,7 @@ void gc_about_start ()
gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
- "text", _("About GCompris"),
+ "text", _("About GCompris"),
"font", gc_skin_font_title,
"x", (double) BOARDWIDTH/2 + 1.0,
"y", (double) y_start + 40 + 1.0,
@@ -108,7 +108,7 @@ void gc_about_start ()
NULL);
gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
- "text", _("About GCompris"),
+ "text", _("About GCompris"),
"font", gc_skin_font_title,
"x", (double) BOARDWIDTH/2,
"y", (double) y_start + 40,
@@ -119,7 +119,7 @@ void gc_about_start ()
gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
- "text", _("Translators:"),
+ "text", _("Translators:"),
"font", gc_skin_font_subtitle,
"x", (double) BOARDWIDTH/2-320 + 1.0,
"y", (double) y_start + 90 + 1.0,
@@ -128,7 +128,7 @@ void gc_about_start ()
NULL);
gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
- "text", _("Translators:"),
+ "text", _("Translators:"),
"font", gc_skin_font_subtitle,
"x", (double) BOARDWIDTH/2-320,
"y", (double) y_start + 90,
@@ -200,13 +200,13 @@ void gc_about_start ()
pixmap = gc_skin_pixmap_load("ofsetlogo.png");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap,
+ "pixbuf", pixmap,
"x", (double) (BOARDWIDTH*0.15) - gdk_pixbuf_get_width(pixmap)/2,
"y", (double) y_start - gdk_pixbuf_get_height(pixmap)/2,
NULL);
gdk_pixbuf_unref(pixmap);
-
+
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
"text", "OFSET\nhttp://ofset.org",
@@ -214,19 +214,19 @@ void gc_about_start ()
"x", (double) (BOARDWIDTH*0.15),
"y", (double) y_start + 80,
"anchor", GTK_ANCHOR_CENTER,
- "fill_color_rgba",gc_skin_color_subtitle,
+ "fill_color_rgba",gc_skin_color_subtitle,
NULL);
// FSF Reference
pixmap = gc_skin_pixmap_load("fsflogo.png");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap,
+ "pixbuf", pixmap,
"x", (double) (BOARDWIDTH*0.8) - gdk_pixbuf_get_width(pixmap)/2,
"y", (double) y_start - gdk_pixbuf_get_height(pixmap)/2,
NULL);
gdk_pixbuf_unref(pixmap);
-
+
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
"text", "Free Software Foundation\nhttp://www.fsf.org",
@@ -242,8 +242,8 @@ void gc_about_start ()
pixmap = gc_skin_pixmap_load("gcomprislogo.png");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap,
- "x", (double) (BOARDWIDTH*0.5) - gdk_pixbuf_get_width(pixmap)/2,
+ "pixbuf", pixmap,
+ "x", (double) (BOARDWIDTH*0.5) - gdk_pixbuf_get_width(pixmap)/2 -50,
"y", (double) y_start - gdk_pixbuf_get_height(pixmap)/2,
NULL);
@@ -253,7 +253,7 @@ void gc_about_start ()
gnome_canvas_text_get_type (),
"text", _("GCompris Home Page\nhttp://gcompris.net"),
"font", gc_skin_font_content,
- "x", (double) (BOARDWIDTH*0.5),
+ "x", (double) (BOARDWIDTH*0.5) - 50,
"y", (double) y_start + 30,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", gc_skin_color_subtitle,
@@ -307,7 +307,7 @@ void gc_about_start ()
pixmap = gc_pixmap_load("sponsor.png");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap,
+ "pixbuf", pixmap,
"x", (double) (BOARDWIDTH*0.85) - gdk_pixbuf_get_width(pixmap)/2,
"y", (double) 15,
NULL);
@@ -320,7 +320,7 @@ void gc_about_start ()
pixmap = gc_skin_pixmap_load("button_large.png");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap,
+ "pixbuf", pixmap,
"x", (double) BOARDWIDTH*0.5 - gdk_pixbuf_get_width(pixmap)/2,
"y", (double) y - gdk_pixbuf_get_height(pixmap) - 5,
NULL);
@@ -368,7 +368,7 @@ void gc_about_start ()
plane_speed = 1;
plane_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
- "pixbuf", pixmap_about,
+ "pixbuf", pixmap_about,
"x", (double) plane_x,
"y", (double) plane_y,
NULL);
@@ -393,7 +393,7 @@ void gc_about_stop ()
// Destroy the help box
if(rootitem!=NULL)
gtk_object_destroy(GTK_OBJECT(rootitem));
- rootitem = NULL;
+ rootitem = NULL;
if(pixmap_about)
gdk_pixbuf_unref(pixmap_about);
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index 3aa2ef2..c041964 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -848,8 +848,9 @@ static void setup_window ()
#define TOTAL_ACTIVITY_COUNT 58
{
if(strncmp(properties->key, "thanks_for_your_help", 20)!=0) {
- char *msg = g_strdup_printf(_("GCompris is free software released under the GPL License. In order to support its development, the Windows version provides only %d of the %d activities. You can get the full version for a small fee at\n<http://gcompris.net>\nThe Linux version does not have this restriction. Note that GCompris is being developed to free schools from monopolistic software vendors. If you also believe that we should teach freedom to children, please consider using GNU/Linux. Get more information at FSF:\n<http://www.fsf.org/philosophy>"), WIN_ACTIVITY_COUNT, TOTAL_ACTIVITY_COUNT);
- board_pause();
+ char *msg = g_strdup_printf(_("GCompris is free software released under the GPL License. In order to support its development, the Windows version provides only %d of the %d activities. You can get the full version for a small fee at\n<http://gcompris.net>\nThe Linux version does not have this restriction. Note that GCompris is being developed to free schools from monopolistic software vendors. If you also believe that we should teach freedom to children, please consider using GNU/Linux. Get more information at FSF:\n<http://www.fsf.org/philosophy>"),
+ WIN_ACTIVITY_COUNT, TOTAL_ACTIVITY_COUNT);
+ board_pause(TRUE);
gc_dialog(msg, NULL);
g_free(msg);
}
diff --git a/src/gcompris/images_selector.c b/src/gcompris/images_selector.c
index 1482e5d..efebbbd 100644
--- a/src/gcompris/images_selector.c
+++ b/src/gcompris/images_selector.c
@@ -363,7 +363,8 @@ void gc_selector_images_stop ()
/*-------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------*/
-static void display_image(gchar *imagename, GnomeCanvasItem *root_item)
+static void
+display_image(gchar *imagename, GnomeCanvasItem *root_item)
{
GdkPixbuf *pixmap = NULL;
@@ -430,7 +431,8 @@ static void display_image(gchar *imagename, GnomeCanvasItem *root_item)
* Same as display_image but for the dataset
* The imagelist contains the list of images to be displayed when this dataset is selected
*/
-static void display_image_set(gchar *imagename, GSList *imagelist)
+static void
+display_image_set(gchar *imagename, GSList *imagelist)
{
GdkPixbuf *pixmap = NULL;
GnomeCanvasItem *item;
@@ -648,7 +650,7 @@ item_event_scroll(GnomeCanvasItem *item, GdkEvent *event, GnomeCanvas *canvas)
* --------------
*/
-void
+static void
parseImage (xmlDocPtr doc, xmlNodePtr cur) {
GcomprisProperties *properties = gc_prop_get();
gchar *imageSetName = NULL;
@@ -689,8 +691,7 @@ parseImage (xmlDocPtr doc, xmlNodePtr cur) {
/* -> and else for PACKAGE_DATA_DIR/imagesetname */
if (havePathName) {
if (!g_path_is_absolute (imageSetName)){
- absolutepath = gc_file_find_absolute("%s/%s", pathname, imageSetName,
- NULL);
+ absolutepath = gc_file_find_absolute(imageSetName, NULL);
}
else
absolutepath = g_strdup(imageSetName);
@@ -700,7 +701,7 @@ parseImage (xmlDocPtr doc, xmlNodePtr cur) {
if(!absolutepath)
{
- g_warning("In ImageSet %s, an image is not found. Skipping ImageSet...", absolutepath);
+ g_warning("In ImageSet %s, an image is not found. Skipping ImageSet...", imageSetName);
return;
}
diff --git a/src/gcompris/skin.c b/src/gcompris/skin.c
index 91b89ed..eddc680 100644
--- a/src/gcompris/skin.c
+++ b/src/gcompris/skin.c
@@ -18,7 +18,7 @@
*/
#include "string.h"
-
+
#include "skin.h"
#include <libxml/tree.h>
#include <libxml/parser.h>
@@ -69,7 +69,7 @@ gc_skin_image_get(gchar *pixmapfile)
if (g_file_test ((filename), G_FILE_TEST_EXISTS)) {
g_free(filename);
-
+
filename = g_strdup_printf("skins/%s/%s", properties->skin, pixmapfile);
return(filename);
@@ -100,16 +100,16 @@ gc_skin_pixmap_load(char *pixmapfile)
filename = gc_skin_image_get(pixmapfile);
result_pixbuf = gc_pixmap_load (filename);
-
+
g_free(filename);
-
+
return (result_pixbuf);
}
/*
- * Utility function used when freeing the memory used by
+ * Utility function used when freeing the memory used by
* a hashtable containing strings.
- */
+ */
static void
gc_skin_free_string(gpointer data)
{
@@ -117,30 +117,30 @@ gc_skin_free_string(gpointer data)
}
/*
- * Initialize some common variables
+ * Initialize some common variables
* (the one that have to be defined in each skin)
*/
void
gc_skin_setup_vars(void)
{
- gc_skin_color_title =
+ gc_skin_color_title =
gc_skin_get_color_default("gcompris/title", COLOR_TITLE);
- gc_skin_color_text_button =
+ gc_skin_color_text_button =
gc_skin_get_color_default("gcompris/text button", COLOR_TEXT_BUTTON);
- gc_skin_color_content =
+ gc_skin_color_content =
gc_skin_get_color_default("gcompris/content", COLOR_CONTENT);
- gc_skin_color_subtitle =
+ gc_skin_color_subtitle =
gc_skin_get_color_default("gcompris/subtitle", COLOR_SUBTITLE);
- gc_skin_color_shadow =
+ gc_skin_color_shadow =
gc_skin_get_color_default("gcompris/shadow", COLOR_SHADOW);
-
- gc_skin_font_title =
+
+ gc_skin_font_title =
gc_skin_get_font_default("gcompris/title", FONT_TITLE);
gc_skin_font_subtitle =
gc_skin_get_font_default("gcompris/subtitle", FONT_SUBTITLE);
- gc_skin_font_content =
+ gc_skin_font_content =
gc_skin_get_font_default("gcompris/content", FONT_CONTENT);
-
+
gc_skin_font_board_tiny =
gc_skin_get_font_default("gcompris/board/tiny", FONT_BOARD_TINY);
gc_skin_font_board_small =
@@ -258,7 +258,7 @@ skin_xml_load (gchar* skin)
guint32 color;
g_return_if_fail(skin!=NULL);
-
+
xmlfilename = \
gc_file_find_absolute("skins/%s/skin.xml",
skin,
@@ -267,12 +267,12 @@ skin_xml_load (gchar* skin)
/* if the file doesn't exist */
if(!xmlfilename)
{
- g_warning("Couldn't find file %s !", xmlfilename);
+ g_warning("Couldn't find skin file %s !", skin);
return;
}
xmldoc = gc_net_load_xml(xmlfilename);
- g_free(xmlfilename);
+ g_free(xmlfilename);
if(!xmldoc)
return;
@@ -291,7 +291,7 @@ skin_xml_load (gchar* skin)
skinNode = xmldoc->children->children;
while((skinNode!=NULL)&&(skinNode->type!=XML_ELEMENT_NODE))
skinNode = skinNode->next;
-
+
if((skinNode==NULL)||
g_strcasecmp((gchar *)skinNode->name, "Skin")!=0) {
g_warning("No Skin node %s", xmldoc->children->children->name);
@@ -310,10 +310,10 @@ skin_xml_load (gchar* skin)
g_hash_table_insert(gc_skin_colors, key, GUINT_TO_POINTER(color));
} else {
if(key!=NULL) g_free(key);
- }
+ }
}
if(data!=NULL) g_free(data);
- }
+ }
else if(g_strcasecmp((gchar *)node->name, "font")==0){
key = (gchar *)xmlGetProp(node, BAD_CAST "id");
data = (gchar *)xmlGetProp(node, BAD_CAST "name");
@@ -333,7 +333,7 @@ skin_xml_load (gchar* skin)
} else {
if(key!=NULL) g_free(key);
if(data!=NULL) g_free(data);
- }
+ }
}
node = node->next;
}
@@ -342,7 +342,7 @@ skin_xml_load (gchar* skin)
}
/*
- * Parse the default skin.xml file and the one located in the skin
+ * Parse the default skin.xml file and the one located in the skin
* directory then load all skins properties into memory
*/
void
@@ -353,7 +353,7 @@ gc_skin_load (gchar* skin)
return;
gc_skin_free();
-
+
gc_skin_fonts = g_hash_table_new_full(g_str_hash, g_str_equal,
gc_skin_free_string,
gc_skin_free_string);