Author: bugman Date: Tue Aug 2 15:41:09 2011 New Revision: 14064 URL: http://svn.gna.org/viewcvs/relax?rev=14064&view=rev Log: The gui_raise() function now only shows the dialog if the status.show_gui flag is set. Modified: branches/gui_testing/gui/errors.py Modified: branches/gui_testing/gui/errors.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/errors.py?rev=14064&r1=14063&r2=14064&view=diff ============================================================================== --- branches/gui_testing/gui/errors.py (original) +++ branches/gui_testing/gui/errors.py Tue Aug 2 15:41:09 2011 @@ -27,6 +27,9 @@ import sys import wx +# relax module imports. +from status import Status; status = Status() + def gui_raise(relax_error, raise_flag=True): """Handle errors in the GUI to be reported to the user. @@ -39,7 +42,8 @@ """ # Show a dialog explaining the error. - wx.MessageBox(relax_error.text, caption=relax_error.__class__.__name__, style=wx.OK|wx.ICON_ERROR) + if status.show_gui: + wx.MessageBox(relax_error.text, caption=relax_error.__class__.__name__, style=wx.OK|wx.ICON_ERROR) # Throw the error to terminate execution. if raise_flag: