Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/svgcard.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-10-17 02:33:46 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-10-17 02:33:46 (GMT)
commit79f95a1996d9afc7cd52d7673065cdf026d04af6 (patch)
tree38f12e21bbc0ab371f4478934dea51e5851fba3c /svgcard.py
parent4cbd6890e2d5785e763a26f39ecf3671d923bee2 (diff)
Skip full flipping animation if second speaking card is correct
Diffstat (limited to 'svgcard.py')
-rw-r--r--svgcard.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/svgcard.py b/svgcard.py
index 5090f84..d408ca6 100644
--- a/svgcard.py
+++ b/svgcard.py
@@ -201,7 +201,7 @@ class SvgCard(gtk.EventBox):
self.current_face = 'back'
self.queue_draw()
- def flip(self):
+ def flip(self, full_animation=False):
if self.flipped:
return
@@ -226,13 +226,14 @@ class SvgCard(gtk.EventBox):
else:
self.show_text = False
- if self.id != -1 and self.get_speak():
- speaking_face = face.acquire()
- if speaking_face:
- self._switch_to_face(speaking_face)
- speaking_face.face.status.voice = \
- speak.voice.by_name(self.get_speak())
- speaking_face.face.say(self.get_text())
+ if full_animation:
+ if self.id != -1 and self.get_speak():
+ speaking_face = face.acquire()
+ if speaking_face:
+ self._switch_to_face(speaking_face)
+ speaking_face.face.status.voice = \
+ speak.voice.by_name(self.get_speak())
+ speaking_face.face.say(self.get_text())
self.current_face = 'front'
self.flipped = True