Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/activity.py b/activity.py
index 3b1d816..aba9d9b 100644
--- a/activity.py
+++ b/activity.py
@@ -188,9 +188,9 @@ class MemorizeActivity(Activity):
if self.play_mode == False:
self.hbox.remove(self.createcardpanel)
self.hbox.remove(self.cardlist)
-
- self.hbox.pack_start(self.scoreboard)
- self.hbox.pack_start(self.table, False)
+ if self.play_mode in (False, None):
+ self.hbox.pack_start(self.scoreboard)
+ self.hbox.pack_start(self.table, False)
self.play_mode = True
def restart(self, widget):
@@ -299,17 +299,11 @@ class MemorizeActivity(Activity):
self.game.rem_buddy(buddy)
def _focus_in(self, event, data=None):
- if self.game.sound == 1:
- self.game.cs.start()
- _logger.debug(" Memorize is visible: start csound server. ")
+ self.game.audio.play()
def _focus_out(self, event, data=None):
- if self.game.sound == 1:
- self.game.cs.pause()
- _logger.debug(" Memorize is invisible: pause csound server. ")
+ self.game.audio.pause()
def _cleanup_cb(self, data=None):
- if self.game.sound == 1:
- self.game.cs.quit()
- _logger.debug(" Memorize closes: close csound server. ")
+ self.game.audio.stop()