Author: bugman Date: Mon Jun 20 18:38:07 2011 New Revision: 13128 URL: http://svn.gna.org/viewcvs/relax?rev=13128&view=rev Log: The cancel button now destroys the wizard dialog and is not a panel method any more. There is still a bug causing segfaults when the dialog is destroyed! Modified: branches/gui_testing/gui/wizard.py Modified: branches/gui_testing/gui/wizard.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/wizard.py?rev=13128&r1=13127&r2=13128&view=diff ============================================================================== --- branches/gui_testing/gui/wizard.py (original) +++ branches/gui_testing/gui/wizard.py Mon Jun 20 18:38:07 2011 @@ -275,17 +275,6 @@ return main_sizer - def cancel(self, event): - """Cancel the operation. - - @param event: The wx event. - @type event: wx event - """ - - # Close. - self.Close() - - def chooser(self, sizer, desc, func, choices): """Build the choice element. @@ -829,7 +818,18 @@ button.SetBitmapLabel(wx.Bitmap(paths.icon_22x22.cancel, wx.BITMAP_TYPE_ANY)) button.SetToolTipString("Abort the operation") self.button_sizers[i].Add(button, 0, wx.ADJUST_MINSIZE, 0) - self.Bind(wx.EVT_BUTTON, self.pages[i].cancel, button) + self.Bind(wx.EVT_BUTTON, self.cancel, button) + + + def cancel(self, event): + """Cancel the operation. + + @param event: The wx event. + @type event: wx event + """ + + # Destroy the window. + self.Destroy() def display_page(self, i):