Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-07-21 03:25:43 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-07-21 03:25:43 (GMT)
commit30a7dcad83789341a08058bf494cd354614f6f0b (patch)
tree086c6dd5503ac4a6a75083b3a9fb0376371576a5 /plugins
parent7f9d2c71a3518e318dab59806b13a84f9178cb63 (diff)
finetune load_block
Diffstat (limited to 'plugins')
-rw-r--r--plugins/turtle_blocks_extras/turtle_blocks_extras.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
index 8442261..6ec5373 100644
--- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py
+++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
@@ -30,7 +30,7 @@ from TurtleArt.talogo import primitive_dictionary, logoerror, \
media_blocks_dictionary
from TurtleArt.taconstants import DEFAULT_SCALE, ICON_SIZE, CONSTANTS, \
MEDIA_SHAPES, SKIN_PATHS, BLOCKS_WITH_SKIN, PYTHON_SKIN, \
- PREFIX_DICTIONARY, VOICES
+ PREFIX_DICTIONARY, VOICES, MACROS
from TurtleArt.tautils import convert, round_int, debug_output, get_path, \
data_to_string, find_group, image_to_base64
from TurtleArt.tajail import myfunc, myfunc_import
@@ -1524,11 +1524,16 @@ bullets'))
block_primitives[name] == name) or \
name in content_blocks:
return self._make_block(name, x, y, defaults)
+ elif blkname in block_names:
+ return self._make_block(blkname, x, y, defaults)
for name in special_names:
# Translate label name into block/prim name.
if blkname in special_names[name]:
return _make_block(name, x, y, defaults)
# Check for a macro
+ if blkname in MACROS:
+ self.tw.new_macro(blkname, x, y)
+ return 0 # Fix me: calculate flow position
# Block not found
raise logoerror("#syntaxerror")
return -1