def clean_up(self): if self.entries: for entry in self.entries: entry.clean_up() self.entries = None self.menu = None pax.unregister_object(self)
def _update(self): state = self.command.sensitive and NORMAL or DISABLED self.configure(state=state) tooltips.AddDescription(self, self.command.menu_name) self.command.Unsubscribe(CHANGED, self._update) pax.unregister_object(self.command) self.configure(command=MakeMethodCommand(self.command.Invoke)) self.command.Subscribe(CHANGED, self._update)
def _update(self): state = self.command.sensitive and NORMAL or DISABLED if state == 'disabled': self.configure(image=self.pict + '_disabled') else: state = '!disabled' self.configure(image=self.pict) self.state(state) tooltips.AddDescription(self, self.command.menu_name) self.command.Unsubscribe(CHANGED, self._update) pax.unregister_object(self.command) self.configure(command=MakeMethodCommand(self.command.Invoke)) self.command.Subscribe(CHANGED, self._update)
def close_dlg(self): self.issue(CLOSED, self) if self.document: self.unsubscribe_receivers() self.document = None try: self.main_window.Unsubscribe(DOCUMENT, self.doc_changed) except: warn_tb(INTERNAL) self.main_window = None Publisher.Destroy(self) self.save_prefs() self.top.destroy() self.master = None import pax pax.unregister_object(self)
def DestroyMethod(self): self.tkwin = None self.tkborder = None pax.unregister_object(self)
def destroy(self): self.command.Unsubscribe(CHANGED, self._update) pax.unregister_object(self.command) self.command = self.args = None Tkinter.Button.destroy(self) pax.unregister_object(self)
def clean_up(self): self.rest = {} pax.unregister_object(self) self.variable = None
def clean_up(self): Publisher.Destroy(self) pax.unregister_object(self)