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>2008-10-25 19:15:32 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2008-10-25 19:15:32 (GMT)
commit06ea8c617d554e19da53fc6ec554f5c04c051640 (patch)
tree761e212a3bfa29e5e122f2083c7dab7c1a0d600a
parent1fa5e50ef7c6cb3861209858ec69b6bccebcb904 (diff)
selected a better text color in clockgame text fixed a major crash case
* boards/skins/babytoy/skin.xml: selected a better text color in clockgame text * src/boards/smallnumbers.c: (key_press), (player_win):fixed a major crash case The crash happend when there are 2 or more dice at the sublevel 9. The first die complete the game and the next die is processed but already deleted. svn path=/trunk/; revision=3578
-rw-r--r--ChangeLog8
-rw-r--r--boards/skins/babytoy/skin.xml6
-rw-r--r--src/boards/smallnumbers.c35
3 files changed, 29 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 44c4ffc..cf5072f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-25 Bruno coudoin <bruno.coudoin@free.fr>
+
+ * boards/skins/babytoy/skin.xml: selected a better text color in
+ clockgame text
+ * src/boards/smallnumbers.c: (key_press), (player_win):fixed a major crash case
+ The crash happend when there are 2 or more dice at the sublevel 9. The first
+ die complete the game and the next die is processed but already deleted.
+
2008-10-16 Bruno coudoin <bruno.coudoin@free.fr>
- Created Ukrainian word list by Slava Dubrovskiy
diff --git a/boards/skins/babytoy/skin.xml b/boards/skins/babytoy/skin.xml
index 3340efd..6f0e3fd 100644
--- a/boards/skins/babytoy/skin.xml
+++ b/boards/skins/babytoy/skin.xml
@@ -39,14 +39,14 @@
<font id="gcompris/board/title bold" name="Sans bold 20"/>
<font id="gcompris/board/huge" name="Sans 28"/>
<font id="gcompris/board/huge bold" name="Sans bold 28"/>
-
+
<color id="menu/text" rgba="0xFFFFFFFF"/>
<color id="menu/text_shadow" rgba="0x000000FF"/>
<!-- Here you may define some other properties that will -->
<!-- affect a particular game. -->
<!-- For example, in futur, the colors of the canal lock game will be -->
- <!-- customisable with some lines like: -->
+ <!-- customisable with some lines like: -->
<!-- <color id="canal_lock/canal color" rgba="0x0010FFFF"/>-->
<!-- <color id="canal_lock/lock color" rgba="0x8cc679FF"/>-->
<!-- <color id="canal_lock/lock color h" rgba="0x71A65FFF"/>-->
@@ -64,7 +64,7 @@
<color id="erase/rectangle in3" rgba="0xf49a9a66"/>
<color id="erase/rectangle out3" rgba="0XFFFFFFFF"/>
<color id="maze/wall color" rgba="0x0000FFFF"/>
- <color id="clockgame/text" rgba="0xFFFFFFFF"/>
+ <color id="clockgame/text" rgba="0Xc20200FF"/>
</Skin>
</GCompris>
diff --git a/src/boards/smallnumbers.c b/src/boards/smallnumbers.c
index b5bab0c..bafb73b 100644
--- a/src/boards/smallnumbers.c
+++ b/src/boards/smallnumbers.c
@@ -248,6 +248,24 @@ static gint key_press(guint keyval, gchar *commit_str, gchar *preedit_str)
(GFunc) smallnumbers_gotkey_item,
GINT_TO_POINTER(keyval));
+ if(gcomprisBoard->sublevel>gcomprisBoard->number_of_sublevel)
+ {
+ /* Try the next level */
+ gcomprisBoard->level++;
+ if(gcomprisBoard->level>gcomprisBoard->maxlevel) { // the current board is finished : bail out
+ gc_score_end();
+ gc_bonus_end_display(GC_BOARD_FINISHED_RANDOM);
+ return TRUE;
+ }
+ gamewon = TRUE;
+ smallnumbers_destroy_all_items();
+ gc_bonus_display(gamewon, GC_BONUS_SMILEY);
+ }
+ else
+ {
+ gc_score_set(gcomprisBoard->sublevel);
+ }
+
return TRUE;
}
@@ -481,23 +499,6 @@ static void player_win(GnomeCanvasItem *item)
gcomprisBoard->sublevel++;
gc_score_set(gcomprisBoard->sublevel);
- if(gcomprisBoard->sublevel>gcomprisBoard->number_of_sublevel)
- {
- /* Try the next level */
- gcomprisBoard->level++;
- if(gcomprisBoard->level>gcomprisBoard->maxlevel) { // the current board is finished : bail out
- gc_score_end();
- gc_bonus_end_display(GC_BOARD_FINISHED_RANDOM);
- return;
- }
- gamewon = TRUE;
- smallnumbers_destroy_all_items();
- gc_bonus_display(gamewon, GC_BONUS_SMILEY);
- }
- else
- {
- gc_score_set(gcomprisBoard->sublevel);
- }
}
static void player_loose()