Commit 1633c0f7 authored by Bruno Coudoin's avatar Bruno Coudoin

Now tux does not focus when it should not

parent 7e8dea91
......@@ -295,6 +295,7 @@ class Gcompris_bargame:
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_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)):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment