Author: bugman Date: Sun May 13 15:19:09 2012 New Revision: 16278 URL: http://svn.gna.org/viewcvs/relax?rev=16278&view=rev Log: The user function GUI objects can now be called with the 'parent' keyword arg. This allows a window other than the main relax window to be the parent, preventing the main window from always coming to the front. Modified: branches/uf_redesign/gui/uf_objects.py Modified: branches/uf_redesign/gui/uf_objects.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/uf_objects.py?rev=16278&r1=16277&r2=16278&view=diff ============================================================================== --- branches/uf_redesign/gui/uf_objects.py (original) +++ branches/uf_redesign/gui/uf_objects.py Sun May 13 15:19:09 2012 @@ -47,15 +47,21 @@ class Uf_object(object): """The object for auto-generating the GUI user functions.""" - def __call__(self, event): + def __call__(self, event=None, parent=None): """Make the GUI user function executable. - @param event: The wx event. - @type event: wx event - """ + @keyword event: The wx event. + @type event: wx event or None + @keyword parent: The parent wx object to associate the user function wizard to. + @type parent: wx object + """ + + # The parent object. + if parent == None: + parent = self._parent # Create the wizard dialog. - wizard = Wiz_window(parent=self._parent, size_x=self._size[0], size_y=self._size[1], title=self._title) + wizard = Wiz_window(parent=parent, size_x=self._size[0], size_y=self._size[1], title=self._title) # Create the page. page = self.create_page(wizard, sync=self._sync)