diff options
author | Nathanaël Lécaudé <Nat@localhost.localdomain> | 2007-01-29 06:00:48 (GMT) |
---|---|---|
committer | Nathanaël Lécaudé <Nat@localhost.localdomain> | 2007-01-29 06:00:48 (GMT) |
commit | 91597cc694d20ef5385805f26af8a1c829b1052c (patch) | |
tree | d6382a53960631eaff81264ac0ea1cdfdf56cc26 /SynthLab | |
parent | d1bd5c3afca2aad09701af702d018f3e99496d07 (diff) |
Redid very ugly code I made in previous update
Diffstat (limited to 'SynthLab')
-rw-r--r-- | SynthLab/SynthLabWindow.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/SynthLab/SynthLabWindow.py b/SynthLab/SynthLabWindow.py index 6fc10cd..a0462fd 100644 --- a/SynthLab/SynthLabWindow.py +++ b/SynthLab/SynthLabWindow.py @@ -173,16 +173,7 @@ class SynthLabWindow( gtk.Window ): self.tooltips.set_tip(closeButton, Tooltips.CLOSE) self.add(self.mainBox) tempFile = 'synthTemp' + str(self.table - 85) - SugarMode = True - try: - from sugar import env - except ImportError: - SugarMode = False - if SugarMode == True: - home_path = env.get_profile_path() + Config.PREF_DIR - else: - home_path = Config.SOUNDS_DIR + '/temp' - if tempFile in os.listdir(home_path): + if tempFile in os.listdir(Config.PREF_DIR): self.handleLoadTemp() else: self.presetCallback(self.presets,0) @@ -802,8 +793,7 @@ class SynthLabWindow( gtk.Window ): def recordSound( self, widget, data=None ): if widget.get_active() == True: self.recordWait = 1 - home_path = env.get_profile_path() + Config.PREF_DIR - os.system('rm ' + home_path + '/lab' + str(self.table - 85)) + os.system('rm ' + Config.PREF_DIR + '/lab' + str(self.table - 85)) else: self.recordWait = 0 @@ -945,16 +935,14 @@ class SynthLabWindow( gtk.Window ): chooser.destroy() def handleSaveTemp( self ): - home_path = env.get_profile_path() + Config.PREF_DIR - file = home_path + '/synthTemp' + str(self.table - 85) + file = Config.PREF_DIR + '/synthTemp' + str(self.table - 85) print file f = shelve.open(file, 'n') self.saveState(f) f.close() def handleLoadTemp( self ): - home_path = env.get_profile_path() + Config.PREF_DIR - file = home_path + '/synthTemp' + str(self.table - 85) + file = Config.PREF_DIR + '/synthTemp' + str(self.table - 85) f = shelve.open(file, 'r') self.loadState(f) f.close() |