Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common/Util
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2008-04-10 03:30:59 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2008-04-10 03:30:59 (GMT)
commit2fa8060b7fd790b3260e65d225a4eca5080683a7 (patch)
treebecc0461cffa308ecf5f77acb9ee130ada0a728c /common/Util
parent957af9bf585d58518bb275ec4926ed11bbd3285e (diff)
On the way to respect security policy
Diffstat (limited to 'common/Util')
-rw-r--r--common/Util/CSoundClient.py10
-rw-r--r--common/Util/Instruments.py3
-rw-r--r--common/Util/LoopSettings.py2
3 files changed, 12 insertions, 3 deletions
diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py
index 7e8ef78..69ed50f 100644
--- a/common/Util/CSoundClient.py
+++ b/common/Util/CSoundClient.py
@@ -95,7 +95,10 @@ class _CSoundClientPlugin:
def load_instruments( self ):
for instrumentSoundFile in self.instrumentDB.instNamed.keys():
if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab' or self.instrumentDB.instNamed[instrumentSoundFile].category == 'mysounds':
- fileName = Config.SNDS_DIR + '/' + instrumentSoundFile
+ try:
+ fileName = Config.JAM_DIR + '/' + instrumentSoundFile
+ except:
+ fileName = Config.SNDS_DIR + '/' + instrumentSoundFile
else:
fileName = Config.SOUNDS_DIR + "/" + instrumentSoundFile
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ instrumentSoundFile ].instrumentId
@@ -104,7 +107,10 @@ class _CSoundClientPlugin:
def load_instrument(self, inst):
if not inst in loadedInstruments:
if inst[0:3] == 'mic' or inst[0:3] == 'lab' or self.instrumentDB.instNamed[inst].category == 'mysounds':
- fileName = Config.SNDS_DIR + '/' + inst
+ try:
+ fileName = Config.JAM_DIR + '/' + inst
+ except:
+ fileName = Config.SNDS_DIR + '/' + inst
else:
fileName = Config.SOUNDS_DIR + "/" + inst
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ inst ].instrumentId
diff --git a/common/Util/Instruments.py b/common/Util/Instruments.py
index 12e755a..ef22bce 100644
--- a/common/Util/Instruments.py
+++ b/common/Util/Instruments.py
@@ -1,6 +1,7 @@
import os
import common.Config as Config
import common.Util.InstrumentDB as InstrumentDB
+from sugar.activity.activity import get_bundle_name
LOW = Config.LOW
MID = Config.MID
@@ -182,6 +183,8 @@ try:
except:
pass
+#jamId = os.path.split(os.path.realpath("/home/olpc/isolation/1/bundle_id_to_gid/org.laptop.TamTamJam"))[1]
+
DRUM1KIT = { 24 : "drum1kick",
26 : "drum1floortom",
diff --git a/common/Util/LoopSettings.py b/common/Util/LoopSettings.py
index a717089..f389275 100644
--- a/common/Util/LoopSettings.py
+++ b/common/Util/LoopSettings.py
@@ -136,7 +136,7 @@ class LoopSettings( gtk.VBox ):
self.show_all()
def handleCheck(self, widget):
- ofile = open(Config.PREF_DIR + "/sounds_settings", 'a')
+ ofile = open(Config.DATA_DIR + "/sounds_settings", 'a')
name = self.nameEntry.get_text()
if self.loopedSound:
tied = str(Config.INST_TIED)