Author: michaelbieri Date: Mon Apr 12 06:43:06 2010 New Revision: 11067 URL: http://svn.gna.org/viewcvs/relax?rev=11067&view=rev Log: The relaxGUI controller cancel button is replaced with a kill button. As python does not allow to selectively kill running threads, a kill button in the relaxGUI controller was introduced, which kills the program. 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=11067&r1=11066&r2=11067&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/controller.py (original) +++ branches/bieri_gui/gui_bieri/controller.py Mon Apr 12 06:43:06 2010 @@ -61,7 +61,7 @@ self.progress_bar = wx.Gauge(self, -1, 100) # buttons - self.cancel_button = wx.Button(self, -1, "Cancel") + self.cancel_button = wx.Button(self, -1, "Kill") self.close_button = wx.Button(self, -1, "Close") # Create Objects (see below) @@ -118,6 +118,8 @@ @type event: wx event """ + sys.exit(0) + # Terminate the event. event.Skip() @@ -178,14 +180,17 @@ wx.CallAfter(self.out.progress_bar.SetValue, (100*no/total_models)) # Sphere to Ellipsoid Models. - if self.status.dAuvergne_protocol.diff_model in ['sphere', 'prolate', 'oblate', 'ellipsoid']: + elif self.status.dAuvergne_protocol.diff_model in ['sphere', 'prolate', 'oblate', 'ellipsoid']: # Determine actual round (maximum is 20). wx.CallAfter(self.out.progress_bar.SetValue, (100*(self.status.dAuvergne_protocol.round-1)/20)) # Final analysis. - if self.status.dAuvergne_protocol.diff_model == 'final': + elif self.status.dAuvergne_protocol.diff_model == 'final': mc_simulation = self.status.mc_number + # Rx Analysis. + else: + print str(cdp.sim_number) # Add new output. wx.CallAfter(self.out.log_panel.AppendText, string)