Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bruno.coudoin@free.fr>2009-11-01 17:59:49 (GMT)
committer Bruno Coudoin <bruno.coudoin@free.fr>2009-11-01 17:59:49 (GMT)
commit5cb903b5ad1dc5c55ac36aa8a0470e48745e59d8 (patch)
tree091679cf76eccf053af14774b3b8b8c31d930d45
parent87dec57fc0451469cfb612cba3a9024ced1015bb (diff)
Properly hide the color selector in playing mode.
-rw-r--r--src/anim-activity/Color.py8
-rw-r--r--src/anim-activity/anim.py3
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: