From 2fa8060b7fd790b3260e65d225a4eca5080683a7 Mon Sep 17 00:00:00 2001 From: Oli Date: Thu, 10 Apr 2008 03:30:59 +0000 Subject: On the way to respect security policy --- (limited to 'TamTamJam.activity/TamTamJam.py') diff --git a/TamTamJam.activity/TamTamJam.py b/TamTamJam.activity/TamTamJam.py index ef66ffd..b52cb10 100644 --- a/TamTamJam.activity/TamTamJam.py +++ b/TamTamJam.activity/TamTamJam.py @@ -26,7 +26,11 @@ class TamTamJam(activity.Activity): gtk.gdk.threads_init() activity.Activity.__init__(self, handle) - self.ensure_dirs() + + for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']: + if not os.path.isfile(os.path.join(Config.DATA_DIR, snd)): + shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.DATA_DIR + '/' + snd) + os.system('chmod 0777 ' + Config.DATA_DIR + '/' + snd + ' &') color = gtk.gdk.color_parse(Config.WS_BCK_COLOR) self.modify_bg(gtk.STATE_NORMAL, color) @@ -93,7 +97,6 @@ class TamTamJam(activity.Activity): def onDestroy(self, arg2): if Config.DEBUG: print 'DEBUG: TamTam::onDestroy()' - os.system('rm -f ' + Config.PREF_DIR + '/synthTemp*') self.jam.onDestroy() @@ -112,20 +115,6 @@ class TamTamJam(activity.Activity): if not os.access(dir, rw): print 'ERROR: directory %s is missing required r/w access\n' % dir - def ensure_dirs(self): - self.ensure_dir(Config.TUNE_DIR) - self.ensure_dir(Config.SYNTH_DIR) - self.ensure_dir(Config.SNDS_DIR) - self.ensure_dir(Config.SNDS_INFO_DIR) - self.ensure_dir(Config.SCRATCH_DIR) - - if not os.path.isdir(Config.PREF_DIR): - os.mkdir(Config.PREF_DIR) - os.system('chmod 0777 ' + Config.PREF_DIR + ' &') - for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']: - shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.SNDS_DIR + '/' + snd) - os.system('chmod 0777 ' + Config.SNDS_DIR + '/' + snd + ' &') - def read_file(self,file_path): self.jam.handleJournalLoad(file_path) -- cgit v0.9.1