Close the window when clicking the toolbar button

This commit is contained in:
Marco Pesenti Gritti 2007-04-27 01:09:00 +02:00
parent c256958a9a
commit 9dcfcf89e9

View File

@ -72,6 +72,7 @@ class Activity(Window, gtk.Container):
activity_toolbar = ActivityToolbar() activity_toolbar = ActivityToolbar()
self.toolbox.add_toolbar('Activity', activity_toolbar) self.toolbox.add_toolbar('Activity', activity_toolbar)
activity_toolbar.connect('close', self._activity_toolbar_close_cb)
activity_toolbar.show() activity_toolbar.show()
def get_service_name(self): def get_service_name(self):
@ -93,6 +94,9 @@ class Activity(Window, gtk.Container):
self._service.join() self._service.join()
self.present() self.present()
def _activity_toolbar_close_cb(self, activity_toolbar):
self.destroy()
def _share_cb(self, ps, success, service, err): def _share_cb(self, ps, success, service, err):
self._pservice.disconnect(self._share_sigid) self._pservice.disconnect(self._share_sigid)
self._share_sigid = None self._share_sigid = None