Author: bugman
Date: Tue Feb 3 19:59:07 2015
New Revision: 27497
URL: http://svn.gna.org/viewcvs/relax?rev=27497&view=rev
Log:
Created the relax GUI prompt Destroy() method.
This is used to cleanly destroy the GUI prompt by first unregistering with the
observer objects,
destroying then deleting the wx.py.shell.Shell instance, and finally destroying
the window.
Modified:
trunk/gui/relax_prompt.py
Modified: trunk/gui/relax_prompt.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/gui/relax_prompt.py?rev=27497&r1=27496&r2=27497&view=diff
==============================================================================
--- trunk/gui/relax_prompt.py (original)
+++ trunk/gui/relax_prompt.py Tue Feb 3 19:59:07 2015
@@ -64,6 +64,20 @@
# Register functions with the observer objects.
status.observers.exec_lock.register('GUI prompt', self.enable,
method_name='enable')
+
+
+ def Destroy(self):
+ """Cleanly destroy the window."""
+
+ # First unregister with the observer objects.
+ status.observers.exec_lock.unregister('GUI prompt')
+
+ # Destroy the prompt.
+ self.prompt.Destroy()
+ del self.prompt
+
+ # Call the parent Destroy() method.
+ super(Prompt, self).Destroy()
def add_shell(self, sizer):
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits