Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
Diffstat (limited to 'activity.py')
-rwxr-xr-xactivity.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/activity.py b/activity.py
index 127e73f..68d73d3 100755
--- a/activity.py
+++ b/activity.py
@@ -92,8 +92,13 @@ class MazeActivity(olpcgames.PyGameActivity):
self.set_toolbar_box(toolbar_box)
toolbar_box.show_all()
+ self.connect("destroy", self.__stop_pygame)
+
return toolbar_box
+ def __stop_pygame(self, widget):
+ pygame.quit()
+
def _easier_button_cb(self, button):
pygame.event.post(olpcgames.eventwrap.Event(
pygame.USEREVENT, action='easier_button'))