Author: bugman Date: Fri Sep 16 10:05:20 2011 New Revision: 14653 URL: http://svn.gna.org/viewcvs/relax?rev=14653&view=rev Log: The spectrum.delete user function can now be started with an initial ID string. Modified: 1.3/gui/user_functions/spectrum.py Modified: 1.3/gui/user_functions/spectrum.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/spectrum.py?rev=14653&r1=14652&r2=14653&view=diff ============================================================================== --- 1.3/gui/user_functions/spectrum.py (original) +++ 1.3/gui/user_functions/spectrum.py Fri Sep 16 10:05:20 2011 @@ -46,11 +46,21 @@ wizard.run() - def delete(self): - """The spectrum.delete user function.""" - - # Execute the wizard. - wizard = self.create_wizard(size_x=700, size_y=400, name='spectrum.delete', uf_page=Delete_page) + def delete(self, spectrum_id=None): + """The spectrum.delete user function. + + @keyword spectrum_id: The starting spectrum ID string. + @type spectrum_id: str + """ + + # Create the wizard. + wizard, page = self.create_wizard(size_x=700, size_y=400, name='spectrum.delete', uf_page=Delete_page, return_page=True) + + # Default ID. + if spectrum_id: + page.spectrum_id.SetValue(str_to_gui(spectrum_id)) + + # Execute the wizard. wizard.run()