Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBruno Coudoin <bcoudoin@src.gnome.org>2003-08-21 14:01:35 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2003-08-21 14:01:35 (GMT)
commitb3b973c3384af432d8b6cd085d62d4c68f2c2533 (patch)
treea193ee0cd5b107cb0132307a690c86d45a2ff642 /src
parentc7fc2ecdeb3cca99decb359e8ae3d38f71a4f6b1 (diff)
fixed highlighting the dice was resseting the dic to 1
Diffstat (limited to 'src')
-rw-r--r--src/boards/reversecount.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/boards/reversecount.c b/src/boards/reversecount.c
index 4d4894e..62dccda 100644
--- a/src/boards/reversecount.c
+++ b/src/boards/reversecount.c
@@ -718,7 +718,6 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gint *dice_index)
if(dicevalue_array[i]-- == 1)
dicevalue_array[i] = max_dice_number;
break;
- break;
default:
break;
}
@@ -726,12 +725,14 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gint *dice_index)
str = g_strdup_printf("gcompris/dice/gnome-dice%d.png", dicevalue_array[i]);
pixmap = gcompris_load_pixmap(str);
-
- gnome_canvas_item_set(item,
- "pixbuf",pixmap,
- NULL);
-
+
+ /* Warning changing the image needs to update pixbuf_ref for the focus usage */
+ g_object_set_data (G_OBJECT (item), "pixbuf_ref", pixmap);
+ gnome_canvas_item_set (item,
+ "pixbuf", pixmap,
+ NULL);
gdk_pixbuf_unref(pixmap);
+
g_free(str);
break;