[gcompris/gcomprixogoo] Properly hide the color selector in playing mode.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] Properly hide the color selector in playing mode.
- Date: Sun, 1 Nov 2009 18:00:16 +0000 (UTC)
commit 5cb903b5ad1dc5c55ac36aa8a0470e48745e59d8
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sun Nov 1 18:59:49 2009 +0100
Properly hide the color selector in playing mode.
src/anim-activity/Color.py | 8 ++++++++
src/anim-activity/anim.py | 3 ++-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/anim-activity/Color.py b/src/anim-activity/Color.py
index 65fb004..29d1cfb 100644
--- a/src/anim-activity/Color.py
+++ b/src/anim-activity/Color.py
@@ -55,6 +55,14 @@ class Color:
]
self.previous_color = 0L
+ def hide(self):
+ self.fillcolor_tool.props.visibility = goocanvas.ITEM_INVISIBLE
+ self.strokecolor_tool.props.visibility = goocanvas.ITEM_INVISIBLE
+
+ def show(self):
+ self.fillcolor_tool.props.visibility = goocanvas.ITEM_VISIBLE
+ self.strokecolor_tool.props.visibility = goocanvas.ITEM_VISIBLE
+
# Display the color selector
def draw(self):
diff --git a/src/anim-activity/anim.py b/src/anim-activity/anim.py
index bfa8a9f..6a59b14 100644
--- a/src/anim-activity/anim.py
+++ b/src/anim-activity/anim.py
@@ -540,6 +540,7 @@ class Gcompris_anim:
gobject.source_remove(self.timeout)
self.root_toolitem.props.visibility = goocanvas.ITEM_VISIBLE
self.root_playingitem.props.visibility = goocanvas.ITEM_INVISIBLE
+ self.color.show()
def speed_event(self, item, target, event, up):
@@ -696,7 +697,7 @@ class Gcompris_anim:
self.root_playingitem.props.visibility = goocanvas.ITEM_VISIBLE
self.timeout = gobject.timeout_add(1000/self.anim_speed,
self.refresh_loop)
-
+ self.color.hide()
def playing_event(self, item, target, event, state):
if event.type == gtk.gdk.BUTTON_PRESS:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]