mailr14232 - in /branches/gui_testing/gui: analyses/__init__.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 August 07, 2011 - 10:44:
Author: bugman
Date: Sun Aug  7 10:44:43 2011
New Revision: 14232

URL: http://svn.gna.org/viewcvs/relax?rev=14232&view=rev
Log:
The File menu entires for new or closing analyses or opening a state are 
blocked with the exec lock.

This is needed because the accelerator keys are still active, even if the 
menu entry is disabled
(possibly a GTK bug).


Modified:
    branches/gui_testing/gui/analyses/__init__.py
    branches/gui_testing/gui/relax_gui.py

Modified: branches/gui_testing/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/__init__.py?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/__init__.py (original)
+++ branches/gui_testing/gui/analyses/__init__.py Sun Aug  7 10:44:43 2011
@@ -287,6 +287,10 @@
         @type event:    wx event
         """
 
+        # Execution lock.
+        if status.exec_lock.locked():
+            return
+
         # Get the current analysis index.
         index = self.notebook.GetSelection()
 
@@ -306,6 +310,10 @@
         @type event:    wx event
         """
 
+        # Execution lock.
+        if status.exec_lock.locked():
+            return
+
         # Ask if this should be done.
         msg = "Are you sure you would like to close all analyses?  All data 
will be erased and the relax data store reset."
         if Question(msg, title="Close all analyses", size=(350, 150), 
default=False).ShowModal() == wx.ID_NO:
@@ -321,6 +329,10 @@
         @param event:   The wx event.
         @type event:    wx event
         """
+
+        # Execution lock.
+        if status.exec_lock.locked():
+            return
 
         # Initialise the analysis wizard, and obtain the user specified data.
         self.new_wizard = Analysis_wizard()

Modified: branches/gui_testing/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/relax_gui.py?rev=14232&r1=14231&r2=14232&view=diff
==============================================================================
--- branches/gui_testing/gui/relax_gui.py (original)
+++ branches/gui_testing/gui/relax_gui.py Sun Aug  7 10:44:43 2011
@@ -417,6 +417,10 @@
         @type file_name:    str
         """
 
+        # Execution lock.
+        if status.exec_lock.locked():
+            return
+
         # Warning.
         if not self.analysis.init_state:
             # The message.




Related Messages


Powered by MHonArc, Updated Sun Aug 07 11:00:01 2011