From e36b89926a1f434254a1ef1bbf4ab1c2415adfb0 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 24 Mar 2012 00:19:13 +0000 Subject: fix problem with hidden block help; removed mallard code --- (limited to 'TurtleArt') diff --git a/TurtleArt/tapalette.py b/TurtleArt/tapalette.py index 276e830..da80386 100644 --- a/TurtleArt/tapalette.py +++ b/TurtleArt/tapalette.py @@ -122,10 +122,6 @@ class Palette(): help_palettes[self._name]) help_palettes[self._name].show() - ''' - self._fd = open('/home/walter/Desktop/turtleblocks/doc/%s-palette.page' % (name), 'a') - ''' - def add_palette(self, position=None): if self._name is None: debug_output('You must specify a name for your palette') @@ -144,28 +140,6 @@ class Palette(): palette_names.insert(i, self._name) palette_blocks.insert(i, []) block_colors.insert(i, self._colors) - - ''' - self._fd.write('\n\ -\n\ - \n\ - \n\ - \n\ - \n\ - \n\ -\n\ -The %s Palette\n\ -

\n\ -%s\n\ -

\n\ -\n\ -' % (self._name, self._name, self._help)) - ''' - else: # debug_output('Palette %s already defined' % (self._name)) return @@ -243,15 +217,16 @@ class Palette(): block.set_prim_name(prim_name) if logo_command is not None: block.set_logo_command(logo_command) - if not hidden and help_string is not None: + if help_string is not None: block.set_help(help_string) - if special_name is None: - if type(label) == list: - self.add_paragraph('%s: %s' % (label[0], help_string)) + if not hidden: + if special_name is None: + if type(label) == list: + self.add_paragraph('%s: %s' % (label[0], help_string)) + else: + self.add_paragraph('%s: %s' % (label, help_string)) else: - self.add_paragraph('%s: %s' % (label, help_string)) - else: - self.add_paragraph('%s: %s' % (special_name, help_string)) + self.add_paragraph('%s: %s' % (special_name, help_string)) if colors is not None: block.set_colors(colors) block.set_value_block(value_block) @@ -261,14 +236,6 @@ class Palette(): block.set_hidden() block.add_block() - ''' - self._fd.write(' \n\ - %s\n\ -

%s

\n\ -
\n\ -' % (block_name, help_string)) - ''' - def make_palette(palette_name, colors=None, help_string=None, position=None): """ Palette helper function """ if colors is None: -- cgit v0.9.1