[gcompris] instruments activity: now the background music is muted when entering this activity.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] instruments activity: now the background music is muted when entering this activity.
- Date: Tue, 27 Dec 2011 17:35:43 +0000 (UTC)
commit 81e7bc62a48e9481f7495b0393dc5a723b1c4c3a
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Tue Dec 27 18:31:15 2011 +0100
instruments activity: now the background music is muted when entering this activity.
src/findit-activity/findit.py | 7 +++++++
src/instruments-activity/instruments.xml.in | 2 +-
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/findit-activity/findit.py b/src/findit-activity/findit.py
index 1b6601c..b0188f0 100644
--- a/src/findit-activity/findit.py
+++ b/src/findit-activity/findit.py
@@ -66,6 +66,10 @@ class Gcompris_findit:
if not data:
return
+ if self.gcomprisBoard.mode == "nobackgroundmusic":
+ # pause the bg music
+ gcompris.sound.pause()
+
self.gcomprisBoard.level = 1
self.gcomprisBoard.maxlevel = self.dataset.number_of_level()
self.gcomprisBoard.sublevel = 1;
@@ -81,6 +85,9 @@ class Gcompris_findit:
self.rootitem.remove()
self.rootitem = None
+ if self.gcomprisBoard.mode == "nobackgroundmusic":
+ gcompris.sound.resume()
+
def repeat(self):
self.play_audio_question(self.datasetlevel.question_audio, self.object_target)
diff --git a/src/instruments-activity/instruments.xml.in b/src/instruments-activity/instruments.xml.in
index 2f6cf85..ed4216e 100644
--- a/src/instruments-activity/instruments.xml.in
+++ b/src/instruments-activity/instruments.xml.in
@@ -4,7 +4,7 @@
name="instruments"
type="python:findit"
section="/discovery/sound_group"
- mode="*"
+ mode="nobackgroundmusic"
difficulty="4"
icon="instruments.svg"
author="Sylvain Dechy (syl 1 free fr)"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]