Author: bugman Date: Fri Jul 8 10:00:11 2011 New Revision: 13518 URL: http://svn.gna.org/viewcvs/relax?rev=13518&view=rev Log: Simplified the window titles for the user functions to be "relax: " plus the user function name. Modified: branches/gui_testing/gui/user_functions/base.py Modified: branches/gui_testing/gui/user_functions/base.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/base.py?rev=13518&r1=13517&r2=13518&view=diff ============================================================================== --- branches/gui_testing/gui/user_functions/base.py (original) +++ branches/gui_testing/gui/user_functions/base.py Fri Jul 8 10:00:11 2011 @@ -53,25 +53,15 @@ @rtype: GUI str """ - # Get the user function class (or function). + # Prefix. + title = 'relax: ' + + # Add the base. if base: - uf_class = getattr(self.interpreter, base) + title = "%s%s." % (title, base) - # Get the user function. - if base: - uf = getattr(uf_class, fn) - else: - uf = getattr(self.interpreter, fn) - - # The title (default to the short one). - if hasattr(uf, '_doc_title_short'): - title = uf._doc_title_short - else: - title = uf._doc_title - - # Remove full stops, if present. - if title[-1] == '.': - title = title[:-1] + # Add the function. + title = "%s%s" % (title, fn) # Return the title as a GUI string. return str_to_gui(title)