Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/SynthLab
diff options
context:
space:
mode:
authorNathanaël Lécaudé <Nat@localhost.localdomain>2007-01-29 05:32:48 (GMT)
committer Nathanaël Lécaudé <Nat@localhost.localdomain>2007-01-29 05:32:48 (GMT)
commitd1bd5c3afca2aad09701af702d018f3e99496d07 (patch)
treeb1e9a11facf7adf87eb7aec1f1e5497f89bb126f /SynthLab
parent9b3d8e0a679913b29390fab8f2da7c68acc9bd1c (diff)
TamTam will run in non-sugar env
Diffstat (limited to 'SynthLab')
-rw-r--r--SynthLab/SynthLabWindow.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/SynthLab/SynthLabWindow.py b/SynthLab/SynthLabWindow.py
index 895af59..6fc10cd 100644
--- a/SynthLab/SynthLabWindow.py
+++ b/SynthLab/SynthLabWindow.py
@@ -8,7 +8,6 @@ import gobject
import time
import shelve
import os
-from sugar import env
import Config
from Util.ThemeWidgets import *
@@ -174,7 +173,15 @@ class SynthLabWindow( gtk.Window ):
self.tooltips.set_tip(closeButton, Tooltips.CLOSE)
self.add(self.mainBox)
tempFile = 'synthTemp' + str(self.table - 85)
- home_path = env.get_profile_path() + Config.PREF_DIR
+ 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):
self.handleLoadTemp()
else: