From 78fcd0d8d223638a9af50826c48e9c518548d45b Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 16 Jun 2012 14:26:57 +0000 Subject: undoing some weird git confusion --- (limited to 'TurtleArt') diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 4f25c5c..120307d 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -54,14 +54,9 @@ from taconstants import HORIZONTAL_PALETTE, VERTICAL_PALETTE, BLOCK_SCALE, \ CONSTANTS, EXPAND_SKIN, PROTO_LAYER from tapalette import palette_names, palette_blocks, expandable_blocks, \ block_names, content_blocks, default_values, special_names, block_styles, \ -<<<<<<< HEAD help_strings, hidden_proto_blocks, string_or_number_args, \ make_palette, palette_name_to_index from talogo import LogoCode, primitive_dictionary, logoerror -======= - help_strings, hidden_proto_blocks, string_or_number_args -from talogo import LogoCode ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 from tacanvas import TurtleGraphics from tablock import Blocks, Block from taturtle import Turtles, Turtle @@ -179,11 +174,8 @@ class TurtleArtWindow(): self.coord_scale = 1 self.buddies = [] self.saved_string = '' -<<<<<<< HEAD self._saved_action_name = '' self._saved_box_name = '' -======= ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 self.dx = 0 self.dy = 0 self.media_shapes = {} @@ -1200,7 +1192,6 @@ class TurtleArtWindow(): n -= 1 self.selected_blk.spr.set_label(str(n) + CURSOR) return True -<<<<<<< HEAD elif self._action_name(self.selected_blk, hat=True): if self.selected_blk.values[0] == _('action'): self._new_stack_block(self.selected_blk.spr.labels[0]) @@ -1209,9 +1200,6 @@ class TurtleArtWindow(): if self.selected_blk.values[0] == _('my box'): self._new_box_block(self.selected_blk.spr.labels[0]) self._update_box_names(self.selected_blk.spr.labels[0]) - -======= ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 # Un-highlight any blocks in the stack grp = find_group(self.selected_blk) for blk in grp: @@ -1267,7 +1255,6 @@ class TurtleArtWindow(): 'block', blk.name)) > 0: self.showlabel('dupstack') return True -<<<<<<< HEAD # If we autogenerated a stack prototype, we need # to change its name from 'stack_foo' to 'stack' elif blk.name[0:6] == 'stack_': @@ -1278,8 +1265,6 @@ class TurtleArtWindow(): elif blk.name[0:4] == 'box_': defaults = [blk.name[4:]] name = 'box' -======= ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 # You cannot mix and match sensor blocks elif blk.name in ['sound', 'volume', 'pitch']: if len(self.block_list.get_similar_blocks( @@ -1363,7 +1348,6 @@ class TurtleArtWindow(): self._select_toolbar_button(spr) return True -<<<<<<< HEAD def _update_action_names(self, name): """ change the label on action blocks of the same name """ if CURSOR in self._saved_action_name: @@ -1443,8 +1427,6 @@ class TurtleArtWindow(): return True return False -======= ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 def _select_category(self, spr): """ Select a category from the toolbar """ i = self.selectors.index(spr) @@ -1519,7 +1501,6 @@ class TurtleArtWindow(): for gblk in group: gblk.spr.hide() -<<<<<<< HEAD # if there was a named hat or storein, remove it from the proto palette for gblk in group: if gblk.name == 'hat' and \ @@ -1543,8 +1524,6 @@ class TurtleArtWindow(): palette_blocks[i].remove(name) self.show_toolbar_palette(i, regenerate=True) -======= ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 def _restore_all_from_trash(self): """ Restore all the blocks in the trash can. """ for blk in self.block_list.list: @@ -2168,7 +2147,6 @@ class TurtleArtWindow(): if blk.name == 'number' or blk.name == 'string': self.saved_string = blk.spr.labels[0] -<<<<<<< HEAD if self._action_name(blk, hat=True): if CURSOR in self.saved_string: self._saved_action_name = \ @@ -2185,8 +2163,6 @@ class TurtleArtWindow(): self._saved_box_name = self.saved_string else: self._saved_box_name = '' -======= ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 blk.spr.labels[0] += CURSOR if blk.name == 'number': bx, by = blk.spr.get_xy() @@ -3504,11 +3480,19 @@ class TurtleArtWindow(): def just_blocks(self): """ Filter out 'proto', 'trash', and 'deleted' blocks """ just_blocks_list = [] - for _blk in self.block_list.list: - if _blk.type == 'block': - just_blocks_list.append(_blk) + for blk in self.block_list.list: + if blk.type == 'block': + just_blocks_list.append(blk) return just_blocks_list + def just_protos(self): + """ Filter out 'block', 'trash', and 'deleted' blocks """ + just_protos_list = [] + for blk in self.block_list.list: + if blk.type == 'proto': + just_protos_list.append(blk) + return just_protos_list + def _width_and_height(self, blk): """ What are the width and height of a stack? """ minx = 10000 @@ -3589,7 +3573,6 @@ class TurtleArtWindow(): x, y = self._calc_image_offset('', blk.spr, w, h) blk.scale_image(x, y, w, h) -<<<<<<< HEAD def _new_stack_block(self, name): ''' Add a stack block to the 'blocks' palette ''' if CURSOR in name: @@ -3665,8 +3648,6 @@ class TurtleArtWindow(): return self.lc.boxes['box3' + str(x)] except KeyError: raise logoerror("#emptybox") -======= ->>>>>>> 45bab2c428838e1f9425f0c538c1822e017a7136 def dock_dx_dy(block1, dock1n, block2, dock2n): """ Find the distance between the dock points of two blocks. """ -- cgit v0.9.1