diff options
author | Pootle daemon <pootle@pootle.sugarlabs.org> | 2013-12-12 05:30:30 (GMT) |
---|---|---|
committer | Pootle daemon <pootle@pootle.sugarlabs.org> | 2013-12-12 05:30:30 (GMT) |
commit | 2519aaafcf8346c8154f762bccb71ef249d82b73 (patch) | |
tree | c515a19161b88fd6bbec4051a67d5f3410ed1166 /plugins | |
parent | 0f33843c9de1bcad835e80e896794d21d6e075bf (diff) | |
parent | 7fa8f0461713faacb2a54d30d507f65d7fe863f2 (diff) |
Merge branch 'master' of git.sugarlabs.org:turtleart/mainline
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/turtle_blocks_extras/turtle_blocks_extras.py | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py index 2bb07dd..ec4558f 100644 --- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py +++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py @@ -541,17 +541,35 @@ make "tmp first :taheap\nmake "taheap butfirst :taheap\noutput :tmp\nend\n') prim_name='saveheap', help_string=_('saves FILO (first-in \ last-out heap) to a file')) + self.tw.lc.def_prim('saveheap', 1, Primitive(self.tw.lc.save_heap, arg_descs=[ArgSlot(TYPE_OBJECT)])) - palette.add_block('loadheap', - style='basic-style-1arg', - label=_('load heap from file'), - default=_('filename'), - prim_name='loadheap', - help_string=_('loads FILO (first-in \ + if self.tw.running_sugar: + palette.add_block('loadheap', + style='basic-style-1arg', + hidden=True, + label=_('load heap from file'), + default=_('filename'), + prim_name='loadheap', + help_string=_('loads FILO (first-in \ last-out heap) from a file')) + # macro + palette.add_block('loadheapfromjournal', + style='basic-style-1arg', + label=_('load heap from file'), + help_string=_('loads FILO (first-in \ +last-out heap) from a file')) + else: + palette.add_block('loadheap', + style='basic-style-1arg', + label=_('load heap from file'), + default=_('filename'), + prim_name='loadheap', + help_string=_('loads FILO (first-in \ +last-out heap) from a file')) + self.tw.lc.def_prim('loadheap', 1, Primitive(self.tw.lc.load_heap, arg_descs=[ArgSlot(TYPE_OBJECT)], |