Author: michaelbieri Date: Thu Feb 25 04:10:44 2010 New Revision: 10916 URL: http://svn.gna.org/viewcvs/relax?rev=10916&view=rev Log: The relaxGUI log window reads Progress output and updates progress bar. The automatic calculation scripts have to prompt a message like 'Progress: 10'. The relaxGUI controller recognizes a progress of 10% and updates the prohgress bar. Modified: branches/bieri_gui/gui_bieri/controller.py Modified: branches/bieri_gui/gui_bieri/controller.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/controller.py?rev=10916&r1=10915&r2=10916&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/controller.py (original) +++ branches/bieri_gui/gui_bieri/controller.py Thu Feb 25 04:10:44 2010 @@ -213,7 +213,7 @@ global progress # Limit panle entries to max_entries Lines. - wx.CallAfter(self.limit_entries) + #wx.CallAfter(self.limit_entries) # Add new output. wx.CallAfter(self.out.log_panel.AppendText, string) @@ -225,6 +225,7 @@ check = a.split() # update progress bar + # Monte Carlo Simulation. if 'Simulation' in string: add = round(progress) add_int = int(add) @@ -232,6 +233,12 @@ progress = ( (int(check[1]) * 100) / float(montecarlo + 6)) + 5 time.sleep(0.001) # allow relaxGUI progressbar to get refreshed + # Other calculations. + if 'Progress:' in string: + progress = check[1] + progress = progress.replace('&', '') + wx.CallAfter(self.out.progress_bar.SetValue, int(progress)) + time.sleep(0.001) # allow relaxGUI progressbar to get refreshed class Thread_container: