Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-10-15 17:16:24 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-10-15 17:16:24 (GMT)
commit6e31e4be15f0f6388de2ce416cc6a869f0a4580c (patch)
tree68bff1c5790af43fa071123b0459b5177f16e687 /TurtleArt/tawindow.py
parent068c2315d92f056b7e694f0ee5f2ab41a54c5b67 (diff)
confirm before emptying trash
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r--TurtleArt/tawindow.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index a03240b..9ec057e 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -1596,7 +1596,10 @@ before making changes to your program'))
elif blk.name == 'restore':
self.restore_latest_from_trash()
elif blk.name == 'empty':
- self._empty_trash()
+ if self.running_sugar:
+ self.activity.empty_trash_alert()
+ else:
+ self.empty_trash()
elif blk.name == 'trashall':
for b in self.just_blocks():
if b.type != 'trash':
@@ -2150,7 +2153,7 @@ before making changes to your program'))
self.trash_stack.remove(blk)
- def _empty_trash(self):
+ def empty_trash(self):
''' Permanently remove all blocks presently in the trash can. '''
for blk in self.block_list.list:
if blk.type == 'trash':