mailr27497 - /trunk/gui/relax_prompt.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 03, 2015 - 19:59:
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):




Related Messages


Powered by MHonArc, Updated Wed Feb 04 09:40:02 2015