Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-05-25 18:12:02 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-05-25 18:12:02 (GMT)
commitefe5fd5d11ff3b1b8021201e5f1e8123ed1d14fd (patch)
tree35c5346787a040537983fe901344ef083cf5b181
parent6af0a4fcc3390fbdb3aa0e4d0dabf21f65bf5749 (diff)
patches to make mini versionmini
-rw-r--r--activity/activity-turtleart.svg71
-rw-r--r--activity/activity.info8
-rw-r--r--plugins/turtle_blocks_extras/turtle_blocks_extras.py48
3 files changed, 95 insertions, 32 deletions
diff --git a/activity/activity-turtleart.svg b/activity/activity-turtleart.svg
index 9c2147f..966314a 100644
--- a/activity/activity-turtleart.svg
+++ b/activity/activity-turtleart.svg
@@ -1,26 +1,55 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
<!ENTITY stroke_color "#000">
- <!ENTITY fill_color "#eee">
+ <!ENTITY fill_color "#aaa">
]><svg height="55px" viewBox="0 0 55 55" width="55px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.5" stroke="&stroke_color;" fill="&fill_color;">
- <g>
- <path d="M 27.497 48.279 C 26.944 48.279 26.398 48.244 25.86 48.179 L 27.248 50.528 L 28.616 48.215 C 28.245 48.245 27.875 48.279 27.497 48.279 Z " fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/>
- <g>
- <path d="M 40.16 11.726 C 37.996 11.726 36.202 13.281 35.817 15.333 C 37.676 16.678 39.274 18.448 40.492 20.541 C 42.777 20.369 44.586 18.48 44.586 16.151 C 44.586 13.707 42.604 11.726 40.16 11.726 Z " fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/>
- <path d="M 40.713 39.887 C 39.489 42.119 37.853 44.018 35.916 45.443 C 36.437 47.307 38.129 48.682 40.16 48.682 C 42.603 48.682 44.586 46.702 44.586 44.258 C 44.586 42.003 42.893 40.162 40.713 39.887 Z " fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/>
- <path d="M 14.273 39.871 C 12.02 40.077 10.249 41.95 10.249 44.258 C 10.249 46.701 12.229 48.682 14.673 48.682 C 16.737 48.682 18.457 47.262 18.945 45.35 C 17.062 43.934 15.47 42.061 14.273 39.871 Z " fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/>
- <path d="M 19.026 15.437 C 18.683 13.334 16.872 11.726 14.673 11.726 C 12.229 11.726 10.249 13.707 10.249 16.15 C 10.249 18.532 12.135 20.46 14.494 20.556 C 15.68 18.513 17.226 16.772 19.026 15.437 Z " fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/>
+ <g
+ transform="translate(1.0548307,0)"
+ id="g3780">
+ <path
+ d="m 20.107931,48.8995 c -0.553,0 -1.099,-0.035 -1.637,-0.1 l 1.388,2.349 1.368,-2.313 c -0.371,0.03 -0.741,0.064 -1.119,0.064 z"
+ id="path6"
+ style="fill:&fill_color;;stroke:&stroke_color;;stroke-width:3.5" />
+ <path
+ d="m 32.770931,12.3465 c -2.164,0 -3.958,1.555 -4.343,3.607 1.859,1.345 3.457,3.115 4.675,5.208 2.285,-0.172 4.094,-2.061 4.094,-4.39 0,-2.444 -1.982,-4.425 -4.426,-4.425 z"
+ id="path10"
+ style="fill:&fill_color;;stroke:&stroke_color;;stroke-width:3.5" />
+ <path
+ d="m 33.323931,40.5075 c -1.224,2.232 -2.86,4.131 -4.797,5.556 0.521,1.864 2.213,3.239 4.244,3.239 2.443,0 4.426,-1.98 4.426,-4.424 0,-2.255 -1.693,-4.096 -3.873,-4.371 z"
+ id="path12"
+ style="fill:&fill_color;;stroke:&stroke_color;;stroke-width:3.5" />
+ <path
+ d="m 6.8839309,40.4915 c -2.253,0.206 -4.024,2.079 -4.024,4.387 0,2.443 1.98,4.424 4.424,4.424 2.064,0 3.7840001,-1.42 4.2720001,-3.332 -1.8830001,-1.416 -3.4750001,-3.289 -4.6720001,-5.479 z"
+ id="path14"
+ style="fill:&fill_color;;stroke:&stroke_color;;stroke-width:3.5" />
+ <path
+ d="m 11.636931,16.0575 c -0.343,-2.103 -2.1540001,-3.711 -4.3530001,-3.711 -2.444,0 -4.424,1.981 -4.424,4.424 0,2.382 1.886,4.31 4.245,4.406 1.186,-2.043 2.732,-3.784 4.5320001,-5.119 z"
+ id="path16"
+ style="fill:&fill_color;;stroke:&stroke_color;;stroke-width:3.5" />
+ <path
+ d="m 20.107931,13.1835 c 1.908,0 3.728,0.411 5.418,1.128 0.741,-1.076 1.178,-2.377 1.178,-3.783 0,-3.687 -2.989,-6.677 -6.677,-6.677 -3.687,0 -6.676,2.99 -6.676,6.677 0,1.428 0.452,2.749 1.216,3.834 1.724,-0.749 3.587,-1.179 5.541,-1.179 z"
+ id="path18"
+ style="fill:&fill_color;;stroke:&stroke_color;;stroke-width:3.5" />
+ <path
+ d="m 35.712931,31.0415 c 0,4.7344 -1.6452,9.2798 -4.5706,12.6275 -2.9254,3.3478 -6.8973,5.2305 -11.0344,5.2305 -4.1371,0 -8.109,-1.8827 -11.0344001,-5.2305 -2.9254,-3.3477 -4.5706,-7.8931 -4.5706,-12.6275 0,-9.7966 7.0444001,-17.858 15.6050001,-17.858 8.5606,0 15.605,8.0614 15.605,17.858 z"
+ id="path22"
+ style="fill:&fill_color;;stroke:&stroke_color;;stroke-width:3.5" />
+ <path
+ d="m 18.170469,41.34705 c -0.04027,0.196301 -0.284476,0.04257 -0.326265,-0.06693 -0.113246,-0.296726 0.190829,-0.556994 0.460117,-0.585605 0.481693,-0.05118 0.841892,0.403378 0.844944,0.853308 0.0045,0.660291 -0.617742,1.132276 -1.246499,1.104284 -0.838035,-0.03731 -1.424819,-0.832609 -1.363624,-1.639691 0.07701,-1.015629 1.047684,-1.718443 2.032883,-1.622963 1.193208,0.11564 2.012686,1.262866 1.882302,2.426074 -0.153654,1.3708 -1.478116,2.307318 -2.819265,2.141642 -1.54841,-0.19128 -2.602209,-1.69341 -2.400981,-3.212456 0.228647,-1.726037 1.908736,-2.897281 3.605647,-2.660321 1.903678,0.265833 3.192484,2.124086 2.91966,3.998839 -0.302885,2.081331 -2.339453,3.487786 -4.39203,3.178999"
+ transform="matrix(-3.4297324,0,0,3.6312387,83.393589,-119.72826)"
+ id="path3010"
+ style="fill:none;stroke:&stroke_color;;stroke-width:0.68119836;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <g
+ transform="matrix(0.98448199,0.17548566,-0.17548566,0.98448199,0.38386657,-0.7844834)"
+ id="g3006"
+ style="fill:&fill_color;;fill-opacity:1">
+ <path
+ d="m 40.575634,29.752495 c 0,0 6.854,-8.475 8.649,-11.625 2.637,-4.629 3.951,-9.307 1.935,-10.182 -1.482,-0.644 -5.54,2.84 -7.669,6.662 -1.441,2.594 -6.557,13.261 -6.557,13.261 l 3.642,1.884 z"
+ id="path3106"
+ style="fill:&fill_color;;fill-opacity:1;stroke:&stroke_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round" />
+ <path
+ d="m 40.575634,29.752495 -3.676,-1.908 c 0,0 -2.889,1.954 -3.99,3.899 -1.101,1.956 -1.143,5.758 -3.071,7.748 -1.159,1.193 -0.01,0.943 -0.01,0.943 0,0 6.959,-2.412 8.337,-4.542 1.368,-2.11 2.41,-6.14 2.41,-6.14 z"
+ id="path3108"
+ style="fill:&fill_color;;fill-opacity:1;stroke:&stroke_color;;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round" />
+ </g>
</g>
- <path d="M 27.497 12.563 C 29.405 12.563 31.225 12.974 32.915 13.691 C 33.656 12.615 34.093 11.314 34.093 9.908 C 34.093 6.221 31.104 3.231 27.416 3.231 C 23.729 3.231 20.74 6.221 20.74 9.908 C 20.74 11.336 21.192 12.657 21.956 13.742 C 23.68 12.993 25.543 12.563 27.497 12.563 Z " fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/>
- <g>
- <path d="M 43.102 30.421 C 43.102 35.1554 41.4568 39.7008 38.5314 43.0485 C 35.606 46.3963 31.6341 48.279 27.497 48.279 C 23.3599 48.279 19.388 46.3963 16.4626 43.0485 C 13.5372 39.7008 11.892 35.1554 11.892 30.421 C 11.892 20.6244 18.9364 12.563 27.497 12.563 C 36.0576 12.563 43.102 20.6244 43.102 30.421 Z " fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/>
- </g>
- <g>
- <path d="M 25.875 33.75 L 24.333 29.125 L 27.497 26.538 L 31.112 29.164 L 29.625 33.833 Z " fill="&stroke_color;" stroke="none" stroke-width="3.5"/>
- <path d="M 27.501 41.551 C 23.533 41.391 21.958 39.542 21.958 39.542 L 25.528 35.379 L 29.993 35.547 L 33.125 39.667 C 33.125 39.667 30.235 41.661 27.501 41.551 Z " fill="&stroke_color;" stroke="none" />
- <path d="M 18.453 33.843 C 17.604 30.875 18.625 26.959 18.625 26.959 L 22.625 29.126 L 24.118 33.755 L 20.536 37.988 C 20.536 37.987 19.071 35.998 18.453 33.843 Z " fill="&stroke_color;" stroke="none" />
- <path d="M 19.458 25.125 C 19.458 25.125 19.958 23.167 22.497 21.303 C 24.734 19.66 26.962 19.583 26.962 19.583 L 26.925 24.564 L 23.404 27.314 L 19.458 25.125 Z " fill="&stroke_color;" stroke="none" />
- <path d="M 32.084 27.834 L 28.625 24.959 L 29 19.75 C 29 19.75 30.834 19.708 32.959 21.417 C 35.187 23.208 36.321 26.4 36.321 26.4 L 32.084 27.834 Z " fill="&stroke_color;" stroke="none" />
- <path d="M 31.292 34.042 L 32.605 29.578 L 36.792 28.042 C 36.792 28.042 37.469 30.705 36.75 33.709 C 36.21 35.965 34.666 38.07 34.666 38.07 L 31.292 34.042 Z " fill="&stroke_color;" stroke="none" />
- </g>
- </g>
</svg>
diff --git a/activity/activity.info b/activity/activity.info
index 00515b4..8eee31c 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,11 +1,11 @@
[Activity]
-name = TurtleBlocks
+name = Turtle Art Mini
activity_version = 178
license = MIT
-bundle_id = org.laptop.TurtleArtActivity
+bundle_id = org.laptop.TurtleArtMiniActivity
exec = sugar-activity TurtleArtActivity.TurtleArtActivity
icon = activity-turtleart
show_launcher = yes
-website = http://wiki.sugarlabs.org/go/Activities/Turtle_Art
-mime_types = application/x-turtle-art;application/vnd.turtleblocks
+update_url = http://wiki.laptop.org/go/Activities/G1G1
+mime_types = application/x-turtle-art
summary = A Logo-inspired turtle that draws colorful pictures with snap-together visual programming blocks
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
index 36d98e2..6e0d644 100644
--- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py
+++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
@@ -64,6 +64,7 @@ class Turtle_blocks_extras(Plugin):
self.tw = parent
def setup(self):
+ debug_output('TURTLE BLOCKS EXTRAS', False)
SKIN_PATHS.append('plugins/turtle_blocks_extras/images')
self.heap = self.tw.lc.heap
@@ -92,6 +93,7 @@ class Turtle_blocks_extras(Plugin):
# internally expanded macro
palette.add_block('while',
+ hidden=True,
style='clamp-style-boolean',
label=_('while'),
prim_name='while',
@@ -102,6 +104,7 @@ boolean operators from Numbers palette'))
# internally expanded macro
palette.add_block('until',
+ hidden=True,
style='clamp-style-boolean',
label=_('until'),
prim_name='until',
@@ -112,6 +115,7 @@ boolean operators from Numbers palette'))
primitive_dictionary['clamp'] = self._prim_clamp
palette.add_block('sandwichclamp',
+ hidden=True,
style='clamp-style-collapsible',
label=' ',
special_name=_('top'),
@@ -308,6 +312,7 @@ complete'))
primitive_dictionary['sinewave'] = self._prim_sinewave
palette.add_block('sinewave',
+ hidden=True,
style='basic-style-3arg',
# TRANS: pitch, duration, amplitude
label=[_('sinewave') + '\n\n', _('pitch'),
@@ -341,6 +346,7 @@ pressed'))
primitive_dictionary['mousebutton2'] = self._prim_mouse_button_bool
palette.add_block('mousebutton2',
+ hidden=True,
style='boolean-block-style',
label=_('button down'),
prim_name='mousebutton2',
@@ -352,6 +358,7 @@ pressed'))
primitive_dictionary['mousebutton2']())
palette.add_block('mousex',
+ hidden=True,
style='box-style',
label=_('mouse x'),
prim_name='mousex',
@@ -362,6 +369,7 @@ pressed'))
self.tw.mouse_x - (self.tw.canvas.width / 2))
palette.add_block('mousey',
+ hidden=True,
style='box-style',
label=_('mouse y'),
prim_name='mousey',
@@ -373,6 +381,7 @@ pressed'))
primitive_dictionary['kbinput'] = self._prim_kbinput
palette.add_block('kbinput',
+ hidden=True,
style='basic-style-extended-vertical',
label=_('query keyboard'),
prim_name='kbinput',
@@ -382,6 +391,7 @@ stored in keyboard block)'))
lambda self: primitive_dictionary['kbinput']())
palette.add_block('keyboard',
+ hidden=True,
style='box-style',
label=_('keyboard'),
prim_name='keyboard',
@@ -418,6 +428,7 @@ block as number'))
primitive_dictionary['readpixel'] = self._prim_readpixel
palette.add_block('readpixel',
+ hidden=True,
style='basic-style-extended-vertical',
label=_('read pixel'),
prim_name='readpixel',
@@ -429,6 +440,7 @@ to the stack'))
primitive_dictionary['see'] = self._prim_see
palette.add_block('see',
+ hidden=True,
style='box-style',
label=_('turtle sees'),
prim_name='see',
@@ -457,6 +469,7 @@ program started'))
primitive_dictionary['push'] = self._prim_push
palette.add_block('push',
+ hidden=True,
style='basic-style-1arg',
#TRANS: push adds a new item to the program stack
label=_('push'),
@@ -471,6 +484,7 @@ last-out heap)'))
primitive_dictionary['printheap'] = self._prim_printheap
palette.add_block('printheap',
+ hidden=True,
style='basic-style-extended-vertical',
label=_('show heap'),
prim_name='printheap',
@@ -484,6 +498,7 @@ end\n')
primitive_dictionary['clearheap'] = self._prim_emptyheap
palette.add_block('clearheap',
+ hidden=True,
style='basic-style-extended-vertical',
label=_('empty heap'),
prim_name='clearheap',
@@ -497,6 +512,7 @@ end\n')
primitive_dictionary['pop'] = self._prim_pop
palette.add_block('pop',
+ hidden=True,
style='box-style',
#TRANS: pop removes a new item from the program stack
label=_('pop'),
@@ -523,6 +539,7 @@ make "tmp first :taheap\nmake "taheap butfirst :taheap\noutput :tmp\nend\n')
primitive_dictionary['isheapempty2'] = self._prim_is_heap_empty_bool
palette.add_block('isheapempty2',
+ hidden=True,
style='boolean-block-style',
label=_('empty heap?'),
prim_name='isheapempty2',
@@ -534,6 +551,7 @@ make "tmp first :taheap\nmake "taheap butfirst :taheap\noutput :tmp\nend\n')
primitive_dictionary['print'] = self._prim_print
palette.add_block('comment',
+ hidden=True,
style='basic-style-1arg',
label=_('comment'),
prim_name='comment',
@@ -558,6 +576,7 @@ bottom of the screen'))
primitive_dictionary['chr'] = self._prim_chr
palette.add_block('chr',
+ hidden=True,
style='number-style-1arg',
label='chr',
prim_name='chr',
@@ -567,6 +586,7 @@ bottom of the screen'))
primitive_dictionary['int'] = self._prim_int
palette.add_block('int',
+ hidden=True,
style='number-style-1arg',
label='int',
prim_name='int',
@@ -576,6 +596,7 @@ bottom of the screen'))
primitive_dictionary['myfunction'] = self._prim_myfunction
palette.add_block('myfunc1arg',
+ hidden=True,
style='number-style-var-arg',
label=[_('Python'), 'f(x)', 'x'],
prim_name='myfunction',
@@ -617,6 +638,7 @@ advanced multi-variable math equations, e.g., sin(x+y+z)'))
primitive_dictionary['userdefined'] = self._prim_myblock
palette.add_block('userdefined',
+ hidden=True,
style='basic-style-var-arg',
label=' ',
prim_name='userdefined',
@@ -685,6 +707,7 @@ module found in the Journal'))
lambda self: self.tw.set_polar(True))
palette.add_block('addturtle',
+ hidden=True,
style='basic-style-1arg',
label=_('turtle'),
prim_name='turtle',
@@ -697,6 +720,7 @@ module found in the Journal'))
primitive_dictionary['activeturtle'] = self._prim_active_turtle
palette.add_block('activeturtle',
+ hidden=True,
style='box-style',
#TRANS: pop removes a new item from the program stack
label=_('active turtle'),
@@ -721,6 +745,7 @@ module found in the Journal'))
# macro
palette.add_block('reskin',
+ hidden=True,
style='basic-style-1arg',
label=_('turtle shell'),
help_string=_("put a custom 'shell' on the turtle"))
@@ -735,6 +760,7 @@ module found in the Journal'))
primitive_dictionary['loadblock'] = self._prim_load_block
palette.add_block('loadblock',
+ hidden=True,
style='basic-style-var-arg',
label=_('load'),
prim_name='loadblock',
@@ -745,8 +771,8 @@ module found in the Journal'))
primitive_dictionary['loadblock'](x))
palette.add_block('loadblock2arg',
- style='basic-style-var-arg',
hidden=True,
+ style='basic-style-var-arg',
label=_('load'),
prim_name='loadblock2',
string_or_number=True,
@@ -757,8 +783,8 @@ module found in the Journal'))
primitive_dictionary['loadblock']([x, y]))
palette.add_block('loadblock3arg',
- style='basic-style-var-arg',
hidden=True,
+ style='basic-style-var-arg',
label=_('load'),
string_or_number=True,
prim_name='loadblock3',
@@ -770,6 +796,7 @@ module found in the Journal'))
primitive_dictionary['loadpalette'] = self._prim_load_palette
palette.add_block('loadpalette',
+ hidden=True,
style='basic-style-1arg',
string_or_number=True,
label=_('palette'),
@@ -782,14 +809,14 @@ module found in the Journal'))
def _portfolio_palette(self):
- palette = make_palette('portfolio',
- colors=["#0606FF", "#0606A0"],
- help_string=_('Palette of presentation \
-templates'),
- position=9)
+ palette = make_palette('extras',
+ colors=["#FF0000", "#A00000"],
+ help_string=_('Palette of extra options'),
+ position=8)
primitive_dictionary['hideblocks'] = self._prim_hideblocks
palette.add_block('hideblocks',
+ hidden=True,
style='basic-style-extended-vertical',
label=_('hide blocks'),
prim_name='hideblocks',
@@ -799,6 +826,7 @@ templates'),
primitive_dictionary['showblocks'] = self._prim_showblocks
palette.add_block('showblocks',
+ hidden=True,
style='basic-style-extended-vertical',
label=_('show blocks'),
prim_name='showblocks',
@@ -829,6 +857,7 @@ templates'),
# macros
palette.add_block('picturelist',
+ hidden=True,
style='basic-style-extended',
label=' ',
help_string=_('presentation template: list of \
@@ -836,6 +865,7 @@ bullets'))
MEDIA_SHAPES.append('list')
palette.add_block('picture1x1a',
+ hidden=True,
style='basic-style-extended',
label=' ',
help_string=_('presentation template: select \
@@ -843,6 +873,7 @@ Journal object (no description)'))
MEDIA_SHAPES.append('1x1a')
palette.add_block('picture1x1',
+ hidden=True,
style='basic-style-extended',
label=' ',
help_string=_('presentation template: select \
@@ -850,6 +881,7 @@ Journal object (with description)'))
MEDIA_SHAPES.append('1x1')
palette.add_block('picture2x2',
+ hidden=True,
style='basic-style-extended',
label=' ',
help_string=_('presentation template: select four \
@@ -857,6 +889,7 @@ Journal objects'))
MEDIA_SHAPES.append('2x2')
palette.add_block('picture2x1',
+ hidden=True,
style='basic-style-extended',
label=' ',
help_string=_('presentation template: select two \
@@ -864,6 +897,7 @@ Journal objects'))
MEDIA_SHAPES.append('2x1')
palette.add_block('picture1x2',
+ hidden=True,
style='basic-style-extended',
label=' ',
help_string=_('presentation template: select two \