From da935d8e4655309fc6db1b0b233917cf930904d3 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Sat, 21 Apr 2012 18:27:27 -0400 Subject: [PATCH] Make closing work more cleanly --- pygo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pygo.py b/pygo.py index 7b31221..08d9d28 100755 --- a/pygo.py +++ b/pygo.py @@ -34,6 +34,8 @@ class Pygo(): def init_widgets(self): + self.window.connect('delete-event', self.on_quit) + self.window.resize(800,600) # gobject.timeout_add(1000, self.update) @@ -99,8 +101,8 @@ class Pygo(): print 'stub: Pygo.on_net_direct()' - def on_quit(self, widget): - sys.exit(0) + def on_quit(self, widget, event=None): + gtk.main_quit() def do_prev_page(self):