Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TurtleArt/tabasics.py5
-rw-r--r--TurtleArt/tawindow.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py
index 8a43dbd..0f01830 100644
--- a/TurtleArt/tabasics.py
+++ b/TurtleArt/tabasics.py
@@ -947,6 +947,11 @@ variable'))
label=_('restore all'),
help_string=_('restore all blocks from trash'))
+ palette.add_block('trashall',
+ style='basic-style-tail',
+ label=_('clear all'),
+ help_string=_('move all blocks to trash'))
+
# Block primitives
def _prim_and(self, x, y):
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 38565e2..5aff270 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -935,6 +935,10 @@ class TurtleArtWindow():
self._restore_latest_from_trash()
elif blk.name == 'empty':
self._empty_trash()
+ elif blk.name == 'trashall':
+ for b in self.just_blocks():
+ if b.type != 'trash':
+ self._put_in_trash(find_top_block(b))
elif blk.name in MACROS:
self._new_macro(blk.name, x + 20, y + 20)
else: