diff options
author | Aleksey 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) |
commit | 79f95a1996d9afc7cd52d7673065cdf026d04af6 (patch) | |
tree | 38f12e21bbc0ab371f4478934dea51e5851fba3c /svgcard.py | |
parent | 4cbd6890e2d5785e763a26f39ecf3671d923bee2 (diff) |
Skip full flipping animation if second speaking card is correct
Diffstat (limited to 'svgcard.py')
-rw-r--r-- | svgcard.py | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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 |