Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bcoudoin@src.gnome.org>2006-03-30 21:34:22 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2006-03-30 21:34:22 (GMT)
commitd12e47ac610444e6f7c823735b325dbed2506eb5 (patch)
tree980046f3c14787ce7a954303dd65048e496bc456
parent4950a18ba9c7fda73aed7bf31745e3b081895158 (diff)
- Fixes unexpected empty menu on windows (untested)
- Fixes unexpected empty menu on windows (untested)
-rw-r--r--ChangeLog8
-rw-r--r--src/gcompris/board.c2
-rw-r--r--src/gcompris/gameutil.c16
3 files changed, 22 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 769d8dc..24d57b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-03-30 Bruno coudoin <bruno.coudoin@free.fr>
+
+ - Fixes unexpected empty menu on windows (untested)
+
+ * src/gcompris/board.c: (init_plugins):
+ * src/gcompris/gameutil.c: (gcompris_board_has_activity),
+ (gcompris_get_menulist):
+
2006-03-30 Yves Combe <yves@ycombe.net>
board was not reinitialised correctly after first use.
diff --git a/src/gcompris/board.c b/src/gcompris/board.c
index c6d5aab..a6ad87e 100644
--- a/src/gcompris/board.c
+++ b/src/gcompris/board.c
@@ -117,6 +117,7 @@ void init_plugins(void)
i=0;
+ static_boards[i++] = get_awele_bplugin_info();
static_boards[i++] = get_advanced_colors_bplugin_info();
static_boards[i++] = get_algebra_bplugin_info();
static_boards[i++] = get_algebra_bplugin_info();
@@ -138,6 +139,7 @@ void init_plugins(void)
static_boards[i++] = get_imageid_bplugin_info();
static_boards[i++] = get_leftright_bplugin_info();
static_boards[i++] = get_machpuzzle_bplugin_info();
+ static_boards[i++] = get_magic_hat_bplugin_info();
static_boards[i++] = get_maze_bplugin_info();
static_boards[i++] = get_memory_bplugin_info();
static_boards[i++] = get_menu_bplugin_info();
diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c
index 4df3aa9..ef2099c 100644
--- a/src/gcompris/gameutil.c
+++ b/src/gcompris/gameutil.c
@@ -1,6 +1,6 @@
/* gcompris - gameutil.c
*
- * Time-stamp: <2006/03/29 22:03:58 bruno>
+ * Time-stamp: <2006/03/30 23:28:50 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
@@ -697,6 +697,7 @@ gcompris_board_has_activity(gchar *section, gchar *name)
(strcmp (board->name, "experimental") == 0))
continue;
+ printf(" section_name=%s, board->section=%s\n", section_name, board->section);
if ((strcmp (section_name, board->section) == 0) &&
(strlen(board->name) != 0) &&
board_check_file(board))
@@ -705,11 +706,17 @@ gcompris_board_has_activity(gchar *section, gchar *name)
strcmp(board->section, section) != 0)
{
/* We must check this menu is not empty recursively */
+ if(gcompris_board_has_activity(board->section, board->name))
+ {
+ g_free(section_name);
+ return(1);
+ }
+ }
+ else
+ {
g_free(section_name);
- return(gcompris_board_has_activity(board->section, board->name));
+ return 1;
}
- g_free(section_name);
- return 1;
}
}
@@ -743,6 +750,7 @@ GList *gcompris_get_menulist(gchar *section)
continue;
if (strcmp (section, board->section) == 0) {
+ printf("section=%s board->section=%s board->name=%s\n", section, board->section, board->name);
if (strlen(board->name) != 0)
{
if(strcmp(board->type, "menu") == 0)