Author: bugman Date: Mon Aug 8 14:21:45 2011 New Revision: 14256 URL: http://svn.gna.org/viewcvs/relax?rev=14256&view=rev Log: Improvements to the user warning dialog about closing windows. The dialog is now only shown once at the start and it blocks the auto-analysis. Modified: branches/gui_testing/gui/analyses/auto_model_free.py branches/gui_testing/gui/analyses/auto_noe.py branches/gui_testing/gui/analyses/auto_rx_base.py branches/gui_testing/gui/relax_gui.py Modified: branches/gui_testing/gui/analyses/auto_model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_model_free.py?rev=14256&r1=14255&r2=14256&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_model_free.py (original) +++ branches/gui_testing/gui/analyses/auto_model_free.py Mon Aug 8 14:21:45 2011 @@ -543,6 +543,9 @@ error_message("relax is currently executing.", "relax execution lock") event.Skip() return + + # User warning to close windows. + self.gui.close_windows() # Synchronise the frame data to the relax data store. self.sync_ds(upload=True) Modified: branches/gui_testing/gui/analyses/auto_noe.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_noe.py?rev=14256&r1=14255&r2=14256&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_noe.py (original) +++ branches/gui_testing/gui/analyses/auto_noe.py Mon Aug 8 14:21:45 2011 @@ -239,6 +239,9 @@ event.Skip() return + # User warning to close windows. + self.gui.close_windows() + # Synchronise the frame data to the relax data store. self.sync_ds(upload=True) Modified: branches/gui_testing/gui/analyses/auto_rx_base.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_rx_base.py?rev=14256&r1=14255&r2=14256&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_rx_base.py (original) +++ branches/gui_testing/gui/analyses/auto_rx_base.py Mon Aug 8 14:21:45 2011 @@ -255,6 +255,9 @@ event.Skip() return + # User warning to close windows. + self.gui.close_windows() + # Synchronise the frame data to the relax data store. self.sync_ds(upload=True) Modified: branches/gui_testing/gui/relax_gui.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/relax_gui.py?rev=14256&r1=14255&r2=14256&view=diff ============================================================================== --- branches/gui_testing/gui/relax_gui.py (original) +++ branches/gui_testing/gui/relax_gui.py Mon Aug 8 14:21:45 2011 @@ -146,7 +146,6 @@ self.user_functions.script.script_exec(script) # Register functions with the observer objects. - status.observers.exec_lock.register('gui', self.close_windows) status.observers.pipe_alteration.register('status bar', self.update_status_bar) @@ -247,10 +246,6 @@ This is to speed up the calculations by avoiding window updates. """ - # No execution lock, so return. - if not status.exec_lock.locked(): - return - # Init the window list. win_list = [] @@ -265,13 +260,13 @@ # The text. text = "The following windows are currently open:\n\n" for win in win_list: - text = "%s\t%s\n" % (text, win) + text = "%s\t%s.\n" % (text, win) text = text + "\nClosing these will significantly speed up the calculations." # Display the error message dialog. if status.show_gui: - self.close_win_dlg = wx.MessageDialog(self, text, caption="Close windows", style=wx.OK|wx.ICON_EXCLAMATION|wx.STAY_ON_TOP) - wx.CallAfter(self.close_win_dlg.ShowModal) + dlg = wx.MessageDialog(self, text, caption="Close windows", style=wx.OK|wx.ICON_EXCLAMATION|wx.STAY_ON_TOP) + dlg.ShowModal() # Otherwise output to stderr. else: