Author: bugman Date: Fri Aug 26 14:02:45 2011 New Revision: 14487 URL: http://svn.gna.org/viewcvs/relax?rev=14487&view=rev Log: The pymol.macro_run and molmol.macro_run user function GUI pages can now have the file name preset. Modified: 1.3/gui/user_functions/molmol.py 1.3/gui/user_functions/pymol.py Modified: 1.3/gui/user_functions/molmol.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/molmol.py?rev=14487&r1=14486&r2=14487&view=diff ============================================================================== --- 1.3/gui/user_functions/molmol.py (original) +++ 1.3/gui/user_functions/molmol.py Fri Aug 26 14:02:45 2011 @@ -80,17 +80,25 @@ wizard.run() - def macro_run(self, event): + def macro_run(self, event, file=None): """The molmol.macro_run user function. @param event: The wx event. @type event: wx event - """ - - # Execute the wizard. + @keyword file: The macro file to start the user function with. + @type file: str + """ + + # Create the wizard. wizard = Wiz_window(size_x=800, size_y=400, title=self.get_title('molmol', 'macro_run')) page = Macro_run_page(wizard, self.gui) wizard.add_page(page) + + # Default file name. + if file: + page.file.SetValue(str_to_gui(file)) + + # Execute the wizard. wizard.run() Modified: 1.3/gui/user_functions/pymol.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/pymol.py?rev=14487&r1=14486&r2=14487&view=diff ============================================================================== --- 1.3/gui/user_functions/pymol.py (original) +++ 1.3/gui/user_functions/pymol.py Fri Aug 26 14:02:45 2011 @@ -80,17 +80,25 @@ wizard.run() - def macro_run(self, event): + def macro_run(self, event, file=None): """The pymol.macro_run user function. @param event: The wx event. @type event: wx event - """ - - # Execute the wizard. + @keyword file: The macro file to start the user function with. + @type file: str + """ + + # Create the wizard. wizard = Wiz_window(size_x=800, size_y=400, title=self.get_title('pymol', 'macro_run')) page = Macro_run_page(wizard, self.gui) wizard.add_page(page) + + # Default file name. + if file: + page.file.SetValue(str_to_gui(file)) + + # Execute the wizard. wizard.run()