Author: bugman Date: Thu Jul 28 23:37:46 2011 New Revision: 13977 URL: http://svn.gna.org/viewcvs/relax?rev=13977&view=rev Log: The Question class can now have the parent specified to allow for sub-windows to have the dialog focus. Modified: branches/gui_testing/gui/message.py Modified: branches/gui_testing/gui/message.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/message.py?rev=13977&r1=13976&r2=13977&view=diff ============================================================================== --- branches/gui_testing/gui/message.py (original) +++ branches/gui_testing/gui/message.py Thu Jul 28 23:37:46 2011 @@ -161,11 +161,13 @@ height_button = 30 width_button = 50 - def __init__(self, msg, title='', size=(350, 125), default=False): + def __init__(self, msg, parent=None, title='', size=(350, 125), default=False): """A generic question box. @param msg: The text message to display. @type msg: str + @keyword parent: The parent wx object. + @type parent: wx.object instance @keyword title: The window title. @type title: str @keyword default: If True, the default button will be 'yes', otherwise it will be 'no'. @@ -181,7 +183,7 @@ self.answer = wx.ID_NO # Initialise the base class. - wx.Dialog.__init__(self, None, title=title, size=size, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) + wx.Dialog.__init__(self, parent, title=title, size=size, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) # Set up the window icon. self.SetIcons(relax_icons)