From 1f9701ecb34f99e83f601c200add6897b621e105 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 20 Oct 2011 14:59:23 +0000 Subject: refactoring in light of proposed solution to #3209 --- diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 11051a0..649e83e 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -1310,7 +1310,7 @@ class TurtleArtWindow(): self.drag_group = find_group(newblk) self.block_operation = 'new' if newblk.name not in self.used_block_list: - self.used_block_list.append(newblk.name) + self.used_block_list.append(newblk.name + ' ') def _new_macro(self, name, x, y): """ Create a "macro" (predefined stack of blocks). """ @@ -2763,7 +2763,7 @@ class TurtleArtWindow(): if check_dock: blk.connections = 'check' if blk.name not in self.used_block_list: - self.used_block_list.append(blk.name) + self.used_block_list.append(blk.name + ' ') return blk def load_start(self, ta_file=None): diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index 9a94279..2bfb404 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -746,7 +746,8 @@ class TurtleArtActivity(activity.Activity): ''' Write the project to the Journal. ''' _logger.debug('Write file: %s' % file_path) self.metadata['mime_type'] = 'application/x-turtle-art' - self.metadata['tags'] = str(self.tw.used_block_list) + self.metadata['turtle_blocks'] = ''.join(self.tw.used_block_list) + self.metadata['activity_data'] = data_to_string(['turtle_blocks']) data_to_file(self.tw.assemble_data_to_save(), file_path) def read_file(self, file_path, run_it=True): -- cgit v0.9.1