From efe5fd5d11ff3b1b8021201e5f1e8123ed1d14fd Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 25 May 2013 18:12:02 +0000 Subject: patches to make mini version --- 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 @@ - + ]> - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - 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 \ -- cgit v0.9.1