diff options
author | Bruno Coudoin <bcoudoin@src.gnome.org> | 2008-03-14 20:37:08 (GMT) |
---|---|---|
committer | Bruno Coudoin <bcoudoin@src.gnome.org> | 2008-03-14 20:37:08 (GMT) |
commit | 2b03c94d7bd85ff4692e02aafbc9bf2104b46de7 (patch) | |
tree | f485e42933ee817c81bcdabcb31f3cd96ce27781 | |
parent | c262b864b4830fd4d4da5b20d6a0c71b3c30e416 (diff) |
Merged from GCompris trunk 3238:
* src/boards/python/mosaic.py: fixed a major bug. this activity was making GCompris
crash one you clicked on the grey target button.
svn path=/branches/gcomprixo/; revision=3300
-rw-r--r-- | src/mosaic-activity/mosaic.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mosaic-activity/mosaic.py b/src/mosaic-activity/mosaic.py index 3a5caa2..9b0b15b 100644 --- a/src/mosaic-activity/mosaic.py +++ b/src/mosaic-activity/mosaic.py @@ -291,8 +291,7 @@ class Gcompris_mosaic: y = orig_y + y * (self.palette_item_height + gap_y)) if not colored: - item.connect("event", self.set_focus_item_event, (i, - item, palette)) + item.connect("event", self.set_focus_item_event, (i, palette)) self.user_list.append((-1, -1)) else: self.target_list.append((color_index_x, color_index_y)) @@ -333,13 +332,13 @@ class Gcompris_mosaic: y = coord_y) item.connect("event", gcompris.utils.item_event_focus) - item.connect("event", self.set_color_item_event, (item, palette_x, palette_y, + item.connect("event", self.set_color_item_event, (palette_x, palette_y, coord_x, coord_y)) # Event when a target square is selected def set_focus_item_event(self, item, event, data): - (index, box_item, palette) = data + (index, palette) = data if event.type == gtk.gdk.BUTTON_PRESS: # A color is selected @@ -350,7 +349,7 @@ class Gcompris_mosaic: self.current_index_y * self.palette_item_height, self.palette_item_width, self.palette_item_height) - box_item.set(pixbuf = image) + item.set(pixbuf = image) self.user_list[index] = (self.current_index_x, self.current_index_y) @@ -366,7 +365,7 @@ class Gcompris_mosaic: if event.type == gtk.gdk.BUTTON_PRESS: gcompris.sound.play_ogg("sounds/paint1.wav"); - (box_item, color_index_x, color_index_y, coord_x, coord_y) = data + (color_index_x, color_index_y, coord_x, coord_y) = data self.current_index_x = color_index_x self.current_index_y = color_index_y |