[gcompris/gcomprixogoo] Now tux does not focus when it should not



commit 1633c0f7d7fabe97e39eeb3baed7eb0c1c21f5b9
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sat Jun 20 18:38:22 2009 +0200

    Now tux does not focus when it should not

 src/bargame-activity/bargame.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/bargame-activity/bargame.py b/src/bargame-activity/bargame.py
index 3df6f09..17023b4 100644
--- a/src/bargame-activity/bargame.py
+++ b/src/bargame-activity/bargame.py
@@ -295,6 +295,7 @@ class Gcompris_bargame:
                 False)
 
     self.answer.new_value(self.number_balls[self.gcomprisBoard.sublevel-1][0])
+    self.profbutton.no_more_active()
 
   def gamelost(self,human):
     self.finished_sublevel = True
@@ -493,10 +494,14 @@ class Gcompris_bargame:
       bounds = self.prof_item.get_bounds()
       self.prof_item.props.x = \
           (gcompris.BOARD_WIDTH - bounds.x2-bounds.x1)/2 - 90
-      self.prof_item.connect("button_press_event",self.event_play)
+      self.prof_item.connect("button_press_event", self.event_play)
+      self.prof_image = prof_image
       # This item is clickeable and it must be seen
       gcompris.utils.item_focus_init(self.prof_item, None)
 
+    def no_more_active(self):
+      gcompris.utils.item_focus_remove(self.prof_item, None)
+
     def event_play(self, item, target, event):
       if ((event.type != gtk.gdk.BUTTON_PRESS) or
           (event.button != 1)):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]