From 13efe7343ed8d5b61d830eee3156c3bc20a122d0 Mon Sep 17 00:00:00 2001 From: Bruno Coudoin Date: Mon, 22 Jun 2009 21:26:43 +0000 Subject: Fixed searace activity to work again. --- diff --git a/src/searace-activity/searace.py b/src/searace-activity/searace.py index 55ecf1a..4ac202c 100644 --- a/src/searace-activity/searace.py +++ b/src/searace-activity/searace.py @@ -108,9 +108,6 @@ class Gcompris_searace: self.rootitem = goocanvas.Group(parent = self.gcomprisBoard.canvas.get_root_item()) gcompris.set_default_background(self.gcomprisBoard.canvas.get_root_item()) - item.connect("button_press_event", self.ruler_item_event) - item.connect("button_release_event", self.ruler_item_event) - item.connect("motion_notify_event", self.ruler_item_event) self.display_sea_area() @@ -308,9 +305,22 @@ class Gcompris_searace: # We manage a 2 colors grid ci = 0 - ca = 0xAACCFFFFL + ca = 0xc6afffFFL cb = 0x1D0DFFFFL + # The background + item = goocanvas.Rect( + parent = self.rootitem, + x = self.sea_area[0], + y = self.sea_area[1], + width = self.sea_area[2] - self.sea_area[0], + height = self.sea_area[3] - self.sea_area[1], + fill_color_rgba=0xafe0ffFFL, + line_width=0) + item.connect("button_press_event", self.ruler_item_event) + item.connect("button_release_event", self.ruler_item_event) + item.connect("motion_notify_event", self.ruler_item_event) + for y in range (self.sea_area[1], self.sea_area[3]+1, int(step_y)): if(ci%2): color = ca -- cgit v0.9.1