diff options
author | Walter Bender <walter@sugarlabs.org> | 2014-02-05 13:50:52 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2014-02-05 13:50:52 (GMT) |
commit | fb2c0d229bbc09b7a05e56cb66af51c91e195514 (patch) | |
tree | 2b06b579d5e0567bc96d8c7736819cbd0e8408fe /sound_check.py | |
parent | dbd7908aaf2c0ad38dbe4ea9415d720cf8190452 (diff) |
Gonzalo's improvements to search for sound resources
Diffstat (limited to 'sound_check.py')
-rw-r--r-- | sound_check.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound_check.py b/sound_check.py index 831e9cf..a6b2819 100644 --- a/sound_check.py +++ b/sound_check.py @@ -19,13 +19,15 @@ import os from gettext import gettext as _ +from sugar3 import env + class SoundLibraryNotFoundError(Exception): def __init__(self): Exception.__init__(self, _('Cannot find TamTamEdit sound library.' ' Did you install TamTamEdit?')) def finddir(): - paths = ['/usr/share/sugar/activities', '/home/olpc/Activities'] + paths = ['/usr/share/sugar/activities', env.get_user_activities_path()] paths.append(os.path.join(os.path.expanduser('~'), 'Activities')) sound_candidate_dirs = None @@ -33,7 +35,8 @@ def finddir(): for path in paths: for f in os.listdir(path): if f in ['TamTamMini.activity', 'TamTamJam.activity', - 'TamTamEdit.activity', 'TamTamSynthLab.activity']: + 'TamTamEdit.activity', 'TamTamSynthLab.activity', + 'MusicalKeyboard.activity']: bundle_dir = os.path.join(path, f) tamtam_subdir = str( os.path.join(bundle_dir, 'common', 'Resources', 'Sounds')) |