Commit 9acc7508 authored by Bruno Coudoin's avatar Bruno Coudoin

- José JORGE created a new set of icons that were missing for the memory

- improved windows code to count automatically the number of activity
	  now the -l list option also display the number of activity.
parent 712088d0
2006-10-10 Bruno coudoin <bruno.coudoin@free.fr>
- Jos JORGE created a new set of icons that were missing for the memory
* board/boardicons/mem_solo_calc.png
* board/boardicons/mem_solo_all.png
* board/boardicons/mem_solo_div.png
* board/boardicons/mem_solo_mult_div.png
* board/boardicons/mem_solo_minus.png
* board/boardicons/mem_solo_mult.png
* board/boardicons/mem_solo_plus.png
* board/boardicons/mem_solo_plus_minus.png
* board/boardicons/mem_tux_div.png
* board/boardicons/mem_tux_calc.png
* board/boardicons/mem_tux_all.png
* board/boardicons/mem_tux_minus.png
* board/boardicons/mem_tux_mult.png
* board/boardicons/mem_tux_mult_div.png
* board/boardicons/mem_tux_plus.png
* board/boardicons/mem_tux_plus_minus.png
* boards/memory_add.xml.in:
* boards/memory_add_minus.xml.in:
* boards/memory_add_minus_mult_div.xml.in:
* boards/memory_add_minus_mult_div_tux.xml.in:
* boards/memory_add_minus_tux.xml.in:
* boards/memory_add_tux.xml.in:
* boards/memory_div.xml.in:
* boards/memory_div_tux.xml.in:
* boards/memory_minus.xml.in:
* boards/memory_minus_tux.xml.in:
* boards/memory_mult.xml.in:
* boards/memory_mult_div.xml.in:
* boards/memory_mult_div_tux.xml.in:
* boards/memory_mult_tux.xml.in:
* boards/memory_op_group.xml.in:
* boards/memory_op_group_tux.xml.in:
- improved windows code to count automatically the number of activity
now the -l list option also display the number of activity.
* src/boards/menu2.c: (item_event):
* src/boards/py-mod-admin.c: (py_board_run_next):
* src/gcompris/board.c: (gc_board_init), (gc_board_run_next):
* src/gcompris/board.h:
* src/gcompris/gcompris.c: (setup_window),
(display_activation_dialog), (gc_init):
2006-10-09 Bruno coudoin <bruno.coudoin@free.fr>
All memory leaks fixed by Miguel DE IZARRA (miguel2i)
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group"
mode="add"
difficulty="1"
icon="boardicons/memory.png"
icon="boardicons/mem_solo_plus.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Addition memory game</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group"
mode="add_minus"
difficulty="1"
icon="boardicons/memory.png"
icon="boardicons/mem_solo_plus_minus.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Addition and subtraction memory game</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group"
mode="add_minus_mult_div"
difficulty="1"
icon="boardicons/memory.png"
icon="boardicons/mem_solo_all.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>All operations memory game</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group_tux"
mode="add_minus_mult_div_tux"
difficulty="1"
icon="boardicons/memory_tux.png"
icon="boardicons/mem_tux_all.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>All operations memory game against Tux</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group_tux"
mode="add_minus_tux"
difficulty="1"
icon="boardicons/memory_tux.png"
icon="boardicons/mem_tux_plus_minus.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Addition and subtraction memory game against Tux</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group_tux"
mode="add_tux"
difficulty="1"
icon="boardicons/memory_tux.png"
icon="boardicons/mem_tux_plus.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Addition memory game against Tux</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group"
mode="div"
difficulty="1"
icon="boardicons/memory.png"
icon="boardicons/mem_solo_div.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Division memory game</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group_tux"
mode="div_tux"
difficulty="1"
icon="boardicons/memory_tux.png"
icon="boardicons/mem_tux_div.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Division memory game against Tux</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group"
mode="minus"
difficulty="1"
icon="boardicons/memory.png"
icon="boardicons/mem_solo_minus.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Subtraction memory game</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group_tux"
mode="minus_tux"
difficulty="1"
icon="boardicons/memory_tux.png"
icon="boardicons/mem_tux_minus.png"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
<_title>Subtraction memory game against Tux</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group"
mode="mult"
difficulty="1"
icon="boardicons/memory.png"
icon="boardicons/mem_solo_mult.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Multiplication memory game</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group"
mode="mult_div"
difficulty="1"
icon="boardicons/memory.png"
icon="boardicons/mem_solo_mult_div.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Multiplication and division memory game</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group_tux"
mode="mult_div_tux"
difficulty="1"
icon="boardicons/memory_tux.png"
icon="boardicons/mem_tux_mult_div.png"
author="Yves Combe (yves@ycombe.net)"
boarddir="">
<_title>Multiplication and division memory game against Tux</_title>
......
......@@ -6,7 +6,7 @@
section="/math/algebramenu/memory_op_group_tux"
mode="mult_tux"
difficulty="1"
icon="boardicons/memory_tux.png"
icon="boardicons/mem_tux_mult.png"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
<_title>Multiplication memory game against Tux</_title>
......
......@@ -4,7 +4,7 @@
name="memory_op_group"
type="menu"
section="/math/algebramenu"
icon="boardicons/memory_elephant.png"
icon="boardicons/mem_solo_calc.png"
author="">
<_title>Go to mathematics memory activities</_title>
<_description>Memory activities based on operations</_description>
......
......@@ -4,7 +4,7 @@
name="memory_op_group_tux"
type="menu"
section="/math/algebramenu"
icon="boardicons/memory_elephant.png"
icon="boardicons/mem_tux_calc.png"
author="">
<_title>Go to mathematics memory activities against Tux</_title>
<_description>Memory activities based on operations</_description>
......
......@@ -667,7 +667,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, MenuItems *menuitems)
}
else
board_run_next (board);
gc_board_run_next (board);
break;
......
......@@ -25,7 +25,7 @@ py_board_run_next (PyObject* self, PyObject* args)
cGcomprisBoard = pyGcomprisBoard->cdata;
/* Call the corresponding C function */
board_run_next(cGcomprisBoard);
gc_board_run_next(cGcomprisBoard);
/* Create and return the result */
Py_INCREF(Py_None);
......
......@@ -84,7 +84,8 @@ static BoardPlugin *static_boards[MAX_NUMBER_OF_BOARDS];
#endif
#ifdef WIN32
void init_plugins(void)
int gc_board_number_in_demo;
void gc_board_init(void)
{
guint i=0;
......@@ -109,6 +110,8 @@ void init_plugins(void)
static_boards_demo[i++] = get_python_bplugin_info();
static_boards_demo[i++] = NULL;
gc_board_number_in_demo = i - 2;
i=0;
static_boards[i++] = get_awele_bplugin_info();
......@@ -169,7 +172,7 @@ void init_plugins(void)
}
}
#else
void init_plugins(void)
void gc_board_init(void)
{
/* Fist make sure the module loading is supported on this platform */
......@@ -415,7 +418,7 @@ void board_run_next_end()
gc_board_play(next_board);
}
void board_run_next(GcomprisBoard *board)
void gc_board_run_next(GcomprisBoard *board)
{
board->previous_board = gc_board_get_current();
......
......@@ -48,19 +48,15 @@ struct BoardPluginData
gboolean playing;
};
void init_plugins(void);
void gc_board_init(void);
BoardPlugin *gc_board_get_current_board_plugin(void);
void set_current_board_plugin(BoardPlugin * ip);
GcomprisBoard *gc_board_get_current(void);
void gc_board_set_current(GcomprisBoard * gcomprisBoard);
gboolean gc_board_check_file(GcomprisBoard *gcomprisBoard);
void gc_board_play(GcomprisBoard *gcomprisBoard);
void gc_board_stop(void);
void gc_board_pause(int pause);
gchar *board_get_info_text(void);
void board_set_info_text(gchar * text);
void board_file_info_box(gchar * filename);
void board_run_next(GcomprisBoard *board);
void gc_board_run_next(GcomprisBoard *board);
#endif
......@@ -708,7 +708,7 @@ static void setup_window ()
gtk_widget_show (GTK_WIDGET(canvas_bg));
init_plugins();
gc_board_init();
/* Load all the menu once */
......@@ -783,14 +783,26 @@ static void setup_window ()
}
#ifdef WIN32
extern int gc_board_number_in_demo;
/** Display the activation dialog for the windows version
*
*/
void
display_activation_dialog()
{
#define WIN_ACTIVITY_COUNT 16
#define TOTAL_ACTIVITY_COUNT 58
int board_count = 0;
GList *list;
/* Count non menu boards */
for (list = gc_menu_get_boards(); list != NULL; list = list->next)
{
GcomprisBoard *board = list->data;
if (strcmp(board->type, "menu") != 0 &&
strcmp(board->section, "/experimental") != 0 &&
strcmp(board->section, "/administration") != 0)
board_count++;
}
if(strncmp(properties->key, "your_welcome", 12)!=0)
{
......@@ -813,9 +825,10 @@ display_activation_dialog()
widget_activation_entry);
gtk_widget_show(GTK_WIDGET(widget_activation_entry));
gtk_entry_set_text(GTK_ENTRY(widget_activation_entry), "CODE");
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);
gc_board_number_in_demo, board_count);
gc_dialog(msg, activation_done);
g_free(msg);
}
......@@ -1479,6 +1492,7 @@ gc_init (int argc, char *argv[])
GList *list = NULL;
GList *menulist = NULL;
GList *menu_todo = NULL;
int board_count = 0;
menu_todo = g_list_append(menu_todo,g_strdup("/"));
......@@ -1493,11 +1507,15 @@ gc_init (int argc, char *argv[])
if (board){
if (strcmp(board->type,"menu")==0)
menu_todo = g_list_prepend(menu_todo, g_strdup_printf("%s/%s",board->section, board->name));
else
board_count++;
printf("%s/%s : %s (%s) \n", board->section, board->name, board->title, board->description );
}
}
}
/* FIXME: Need to translate */
printf("Number of activities: %d\n", board_count);
exit(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment