mailr15806 - in /1.3/gui: controller.py relax_gui.py


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

Header


Content

Posted by edward on April 24, 2012 - 14:32:
Author: bugman
Date: Tue Apr 24 14:32:41 2012
New Revision: 15806

URL: http://svn.gna.org/viewcvs/relax?rev=15806&view=rev
Log:
The relax controller can now not be closed while the test suite is running.

This presents uses from doing silly things, and then reporting it as a bug!


Modified:
    1.3/gui/controller.py
    1.3/gui/relax_gui.py

Modified: 1.3/gui/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/controller.py?rev=15806&r1=15805&r2=15806&view=diff
==============================================================================
--- 1.3/gui/controller.py (original)
+++ 1.3/gui/controller.py Tue Apr 24 14:32:41 2012
@@ -292,6 +292,10 @@
         @type event:    wx event
         """
 
+        # The test suite is running, so disable closing.
+        if self.gui.test_suite_flag:
+            return
+
         # Close the window.
         self.Hide()
 

Modified: 1.3/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/relax_gui.py?rev=15806&r1=15805&r2=15806&view=diff
==============================================================================
--- 1.3/gui/relax_gui.py (original)
+++ 1.3/gui/relax_gui.py Tue Apr 24 14:32:41 2012
@@ -99,6 +99,8 @@
         if status.wx_info["build"]:
             status.wx_info["full"] = "%s-%s" % (status.wx_info["os"], 
status.wx_info["build"])
 
+        # Some internal variables.
+        self.test_suite_flag = False
 
         # The main window style.
         style = wx.DEFAULT_FRAME_STYLE
@@ -450,6 +452,9 @@
         if Question(msg, parent=self, default=False).ShowModal() == wx.ID_NO:
             return
 
+        # Set the test suite flag.
+        self.test_suite_flag = True
+
         # Change the cursor to waiting.
         wx.BeginBusyCursor()
 
@@ -488,6 +493,9 @@
         self.controller.SetWindowStyle(orig_style)
         self.controller.MakeModal(False)
         self.controller.Refresh()
+
+        # Unset the test suite flag.
+        self.test_suite_flag = False
 
 
     def run_test_suite_gui(self, event):




Related Messages


Powered by MHonArc, Updated Tue Apr 24 14:40:02 2012