mailr14745 - in /1.3/gui: ./ analyses/ spin_viewer/ user_functions/


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

Header


Content

Posted by edward on September 21, 2011 - 22:08:
Author: bugman
Date: Wed Sep 21 22:08:47 2011
New Revision: 14745

URL: http://svn.gna.org/viewcvs/relax?rev=14745&view=rev
Log:
A lot of bug fixes for MS Windows with the handling of the busy cursor.

All calls to wx.EndBusyCursor() are preceded by a check via wx.IsBusy().  For 
some reason, in
contrast to other operating systems, MS Windows will sometimes turn off the 
busy cursor by itself.
A subsequence call to wx.EndBusyCursor() results in an error.


Modified:
    1.3/gui/analyses/__init__.py
    1.3/gui/analyses/auto_model_free.py
    1.3/gui/analyses/auto_noe.py
    1.3/gui/analyses/auto_rx_base.py
    1.3/gui/analyses/wizard.py
    1.3/gui/relax_gui.py
    1.3/gui/spin_viewer/frame.py
    1.3/gui/user_functions/base.py

Modified: 1.3/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/__init__.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/analyses/__init__.py (original)
+++ 1.3/gui/analyses/__init__.py Wed Sep 21 22:08:47 2011
@@ -437,7 +437,8 @@
 
         # Thaw the GUI.
         self.gui.Thaw()
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
         # Notify the observers of the change.
         status.observers.gui_analysis.notify()

Modified: 1.3/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/auto_model_free.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/analyses/auto_model_free.py (original)
+++ 1.3/gui/analyses/auto_model_free.py Wed Sep 21 22:08:47 2011
@@ -595,7 +595,8 @@
         self.vect_wizard.add_page(page)
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
         # Execute the wizard.
         self.vect_wizard.run()

Modified: 1.3/gui/analyses/auto_noe.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/auto_noe.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/analyses/auto_noe.py (original)
+++ 1.3/gui/analyses/auto_noe.py Wed Sep 21 22:08:47 2011
@@ -326,7 +326,8 @@
         page.on_display_post = self.wizard_update_spectrum_type
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
         # Run the wizard.
         self.wizard.run()

Modified: 1.3/gui/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/auto_rx_base.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/analyses/auto_rx_base.py (original)
+++ 1.3/gui/analyses/auto_rx_base.py Wed Sep 21 22:08:47 2011
@@ -342,7 +342,8 @@
         page.on_init = self.wizard_update_relax_time
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
         # Run the wizard.
         self.wizard.run()

Modified: 1.3/gui/analyses/wizard.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/wizard.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/analyses/wizard.py (original)
+++ 1.3/gui/analyses/wizard.py Wed Sep 21 22:08:47 2011
@@ -62,7 +62,8 @@
         self.wizard.add_page(self.pipe_page, apply_button=False)
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
         # Execute the wizard.
         setup = self.wizard.run(modal=True)

Modified: 1.3/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/relax_gui.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/relax_gui.py (original)
+++ 1.3/gui/relax_gui.py Wed Sep 21 22:08:47 2011
@@ -616,7 +616,10 @@
         # Reset the cursor, and thaw the GUI.
         finally:
             self.Thaw()
-            wx.EndBusyCursor()
+
+            # Turn off the busy cursor.
+            if wx.IsBusy():
+                wx.EndBusyCursor()
 
 
     def state_save(self):
@@ -630,7 +633,8 @@
             wx.BeginBusyCursor()
             state.save_state(self.save_file, verbosity=0, force=True)
         finally:
-            wx.EndBusyCursor()
+            if wx.IsBusy():
+                wx.EndBusyCursor()
 
 
     def sync_ds(self, upload=False):

Modified: 1.3/gui/spin_viewer/frame.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/spin_viewer/frame.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/spin_viewer/frame.py (original)
+++ 1.3/gui/spin_viewer/frame.py Wed Sep 21 22:08:47 2011
@@ -170,7 +170,8 @@
         self.container.display(self.tree_panel.get_info())
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
 
     def handler_close(self, event):
@@ -231,7 +232,8 @@
         self.page_indices['fin'] = self.wizard.add_page(page, 
apply_button=False, skip_button=False)
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
         # Run the wizard.
         self.wizard.run()
@@ -344,7 +346,8 @@
         wx.CallAfter(self.Raise)
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
 
     def wizard_page_after_load_method(self):

Modified: 1.3/gui/user_functions/base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/base.py?rev=14745&r1=14744&r2=14745&view=diff
==============================================================================
--- 1.3/gui/user_functions/base.py (original)
+++ 1.3/gui/user_functions/base.py Wed Sep 21 22:08:47 2011
@@ -167,7 +167,8 @@
         super(UF_page, self).__init__(parent)
 
         # Reset the cursor.
-        wx.EndBusyCursor()
+        if wx.IsBusy():
+            wx.EndBusyCursor()
 
 
     def _format_text(self, text):




Related Messages


Powered by MHonArc, Updated Wed Sep 21 23:00:02 2011