Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-10-06 20:11:50 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-10-06 20:11:50 (GMT)
commit19f7585a9d0f4dd130cf470f5c15f848c7a8415e (patch)
treece21c917c2251a7341ffe50725f470e1a7a027d3
parent0996701c39695e24fbb4992471ba5298f52a4fe6 (diff)
remove tail from blank-style (#3164); use blank-style for trash
-rw-r--r--TurtleArt/tabasics.py6
-rw-r--r--TurtleArt/tablock.py2
-rwxr-xr-xTurtleArt/tasprite_factory.py8
3 files changed, 12 insertions, 4 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py
index 4adcaa7..3dc1e36 100644
--- a/TurtleArt/tabasics.py
+++ b/TurtleArt/tabasics.py
@@ -941,17 +941,17 @@ variable'))
help_string=_('trash'))
palette.add_block('empty',
- style='basic-style-tail',
+ style='blank-style',
label=_('empty trash'),
help_string=_('permanently deletes items in trash'))
palette.add_block('restoreall',
- style='basic-style-head',
+ style='blank-style',
label=_('restore all'),
help_string=_('restore all blocks from trash'))
palette.add_block('trashall',
- style='basic-style-tail',
+ style='blank-style',
label=_('clear all'),
help_string=_('move all blocks to trash'))
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py
index bcca2cd..d2292b1 100644
--- a/TurtleArt/tablock.py
+++ b/TurtleArt/tablock.py
@@ -493,6 +493,7 @@ class Block:
self.svg.expand(self.dx + self.ex + extend_x, self.ey + extend_y)
self.svg.set_slot(False)
self.svg.set_tab(False)
+ self.svg.set_tail(False)
self._make_block_graphics(svg, self.svg.basic_block)
self.docks = []
@@ -520,6 +521,7 @@ class Block:
def _make_basic_style_tail(self, svg):
self.svg.expand(10 + self.dx + self.ex, self.ey)
self.svg.set_tab(False)
+ self.svg.set_tail(True)
self._make_block_graphics(svg, self.svg.basic_block)
self.docks = [['flow', True, self.svg.docks[0][0],
self.svg.docks[0][1]],
diff --git a/TurtleArt/tasprite_factory.py b/TurtleArt/tasprite_factory.py
index 4b6fd78..d05902d 100755
--- a/TurtleArt/tasprite_factory.py
+++ b/TurtleArt/tasprite_factory.py
@@ -57,6 +57,7 @@ class SVG:
self._bool = False
self._slot_x = 10
self._slot_y = 2
+ self._tail = False
self._porch = False
self._porch_x = self._innie_x1 + self._innie_x2 + \
4 * self._stroke_width
@@ -547,6 +548,9 @@ class SVG:
#
# Utility methods
#
+ def set_tail(self, flag=True):
+ self._tail = flag
+
def set_draw_innies(self, flag=True):
self._draw_innies = flag
@@ -940,10 +944,12 @@ class SVG:
def _do_tail(self):
if self._outie is True:
return self._rline_to(-self._slot_x, 0)
- else:
+ elif self._tail:
return "%s%s" % (
self._rline_to(-self._slot_x / 2.0, self._slot_y * 2.0),
self._rline_to(-self._slot_x / 2.0, -self._slot_y * 2.0))
+ else:
+ return self._rline_to(-self._slot_x, 0)
def _do_tab(self):
s = "%s%s%s%s%s" % (