From 9dcfcf89e96894d32905bfe9bae3e1310a21ae1b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 27 Apr 2007 01:09:00 +0200 Subject: [PATCH] Close the window when clicking the toolbar button --- sugar/activity/activity.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index 253d94e0..41d9f084 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -72,6 +72,7 @@ class Activity(Window, gtk.Container): activity_toolbar = ActivityToolbar() self.toolbox.add_toolbar('Activity', activity_toolbar) + activity_toolbar.connect('close', self._activity_toolbar_close_cb) activity_toolbar.show() def get_service_name(self): @@ -93,6 +94,9 @@ class Activity(Window, gtk.Container): self._service.join() self.present() + def _activity_toolbar_close_cb(self, activity_toolbar): + self.destroy() + def _share_cb(self, ps, success, service, err): self._pservice.disconnect(self._share_sigid) self._share_sigid = None