def destroy(self, *args): if not self.indep: self.window.hide() self.shown = False return True else: self.window.destroy() gtk.main_quit()