Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/taproject.py
diff options
context:
space:
mode:
authorPootle daemon <pootle@sugarlabs.org>2009-09-23 13:33:06 (GMT)
committer Pootle daemon <pootle@sugarlabs.org>2009-09-23 13:33:06 (GMT)
commit01f030f1cceabebd1118904d417042689f7b2148 (patch)
tree3f705d1b6f0072fd988ed84b94be9bbc52ecc703 /taproject.py
parent635f8362d22e9e920c45f77f52f9f0d57cf4e0cc (diff)
parent49fae193659f81ba32dc69385c68fb07519c9429 (diff)
Fix conflicts in French and Spanish translations
Diffstat (limited to 'taproject.py')
-rw-r--r--taproject.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/taproject.py b/taproject.py
index 8e0f6cf..b3663ef 100644
--- a/taproject.py
+++ b/taproject.py
@@ -59,14 +59,15 @@ def new_project(tw):
clearscreen(tw.turtle)
tw.save_file_name = None
-def load_file(tw):
+def load_file(tw, create_new_project=True):
fname = get_load_name(tw)
if fname==None: return
if fname[-3:]=='.ta': fname=fname[0:-3]
- load_files(tw,fname+'.ta', fname+'.png')
- tw.save_file_name = os.path.basename(fname)
+ load_files(tw,fname+'.ta', create_new_project)
+ if create_new_project is True:
+ tw.save_file_name = os.path.basename(fname)
-def load_files(tw,ta_file, png_file=''):
+def load_files(tw, ta_file, create_new_project=True):
# ignoring the png_file even if it is present
f = open(ta_file, "r")
try:
@@ -84,7 +85,8 @@ def load_files(tw,ta_file, png_file=''):
# listdata = jdecode(text)
data = tuplify(listdata) # json converts tuples to lists
f.close()
- new_project(tw)
+ if create_new_project is True:
+ new_project(tw)
read_data(tw,data)
def get_load_name(tw):