Author: bugman Date: Wed Nov 12 18:30:47 2014 New Revision: 26554 URL: http://svn.gna.org/viewcvs/relax?rev=26554&view=rev Log: Another large wx ID saving change. The ID associated with the special accelerator table that allows the ESC button to close relax wizards is now initialised once in the module namespace, and not each time a wizard is created. Modified: trunk/gui/wizards/wiz_objects.py Modified: trunk/gui/wizards/wiz_objects.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/wizards/wiz_objects.py?rev=26554&r1=26553&r2=26554&view=diff ============================================================================== --- trunk/gui/wizards/wiz_objects.py (original) +++ trunk/gui/wizards/wiz_objects.py Wed Nov 12 18:30:47 2014 @@ -39,6 +39,11 @@ from status import Status; status = Status() +# The wx ID for the special accelerator table that allows the ESC button to close relax wizards. +ESC_ID = wx.NewId() + + + class Wiz_page(wx.Panel): """The wizard pages to be placed inside the wizard. @@ -482,11 +487,10 @@ self.Bind(wx.EVT_CLOSE, self._handler_close) # ESC to exit, via an accelerator table which creates menu events. - id = wx.NewId() - self.acc_list = [(wx.ACCEL_NORMAL, wx.WXK_ESCAPE, id)] + self.acc_list = [(wx.ACCEL_NORMAL, wx.WXK_ESCAPE, ESC_ID)] self.acc_table = wx.AcceleratorTable(self.acc_list) self.SetAcceleratorTable(self.acc_table) - self.Bind(wx.EVT_MENU, self._handler_escape, id=self.acc_list[0][2]) + self.Bind(wx.EVT_MENU, self._handler_escape, id=ESC_ID) def _apply(self, event=None):