Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/talogo.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2009-09-18 16:27:20 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2009-09-18 16:27:20 (GMT)
commiteafb5ae741681d8eb4f091721735f6ccf1b951f2 (patch)
tree0c5e9e89bd805c30d4ff8e7c797185200d795062 /talogo.py
parent18492832959aadd494f9f4c897c92963d6757b73 (diff)
merge of walters-clone
Diffstat (limited to 'talogo.py')
-rw-r--r--talogo.py47
1 files changed, 35 insertions, 12 deletions
diff --git a/talogo.py b/talogo.py
index 8a7bbed..0a25389 100644
--- a/talogo.py
+++ b/talogo.py
@@ -164,7 +164,10 @@ def setup_cmd(lc, str):
def start_eval(lc, list):
icall(lc, evline, list); yield True
# turn off stop icon when execution is finished
- lc.tw.activity.stop.set_icon("stopitoff")
+ try:
+ lc.tw.activity.stop.set_icon("stopitoff")
+ except:
+ lc.tw.activity.projectToolbar.stop.set_icon("stopitoff")
yield False
def evline(lc, list):
@@ -268,7 +271,7 @@ def debug_trace(lc, token):
my_string += tmp
shp = 'info'
setshape(lc.tw.status_spr, lc.tw.status_shapes[shp])
- setlabel(lc.tw.status_spr, my_string)
+ setlabel(lc.tw.status_spr, _(my_string))
setlayer(lc.tw.status_spr, 710)
return
@@ -282,7 +285,7 @@ def no_args_check(lc):
def prim_wait(lc,time):
setlayer(lc.tw.turtle.spr,630)
- endtime = millis()+an_int(lc,time)*100
+ endtime = millis()+an_int(lc,time*1000)
while millis()<endtime:
yield True
setlayer(lc.tw.turtle.spr,100)
@@ -942,7 +945,12 @@ def hideblocks(lc):
hideshow_button(lc.tw)
for i in lc.tw.selbuttons:
hide(i)
- lc.tw.activity.do_hide()
+ try:
+ # Use new toolbar design
+ lc.tw.activity.do_hide()
+ except:
+ # Use old toolbar design
+ lc.tw.activity.projectToolbar.do_hide()
def doevalstep(lc):
starttime = millis()
@@ -1008,14 +1016,29 @@ def kbinput(lc):
lc.tw.keypress = ""
def showlabel(lc,label):
- if label=='#nostack': shp = 'nostack'; label=''
- elif label=='#noinput': shp = 'noinput'; label=''
- elif label=='#emptyheap': shp = 'emptyheap'; label=''
- elif label=='#emptybox': shp = 'emptybox'; label=' '+lc.nobox
- elif label=='#nomedia': shp = 'nomedia'; label=''
- elif label=='#nocode': shp = 'nocode'; label=''
- elif label=='#syntaxerror': shp = 'syntaxerror'; label=''
- else: shp = 'status'
+ if label=='#nostack':
+ shp = 'nostack'
+ label=''
+ elif label=='#noinput':
+ shp = 'noinput'
+ label=''
+ elif label=='#emptyheap':
+ shp = 'emptyheap'
+ label=''
+ elif label=='#emptybox':
+ shp = 'emptybox'
+ label=' '+lc.nobox
+ elif label=='#nomedia':
+ shp = 'nomedia'
+ label=''
+ elif label=='#nocode':
+ shp = 'nocode'
+ label=''
+ elif label=='#syntaxerror':
+ shp = 'syntaxerror'
+ label=''
+ else:
+ shp = 'status'
setshape(lc.tw.status_spr, lc.tw.status_shapes[shp])
setlabel(lc.tw.status_spr, label)
setlayer(lc.tw.status_spr, 710)