Author: bugman Date: Wed Jun 29 14:26:15 2011 New Revision: 13289 URL: http://svn.gna.org/viewcvs/relax?rev=13289&view=rev Log: Created the new Analysis_controller.current_analysis_name() for returning the current analysis name. Modified: branches/gui_testing/gui/analyses/__init__.py Modified: branches/gui_testing/gui/analyses/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/__init__.py?rev=13289&r1=13288&r2=13289&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/__init__.py (original) +++ branches/gui_testing/gui/analyses/__init__.py Wed Jun 29 14:26:15 2011 @@ -66,6 +66,7 @@ # Initialise some variables. self.init_state = True + self._current = None # The analyses page objects. self.analyses = [] @@ -81,6 +82,21 @@ # Loop over the analyses. for i in range(len(self.analyses)): yield self.analyses[i] + + + def current_analysis_name(self): + """Return the name of the current analysis. + + @return: The name of the current analysis. + @rtype: str + """ + + # No current page. + if self._current == None: + return + + # Return the name. + return self.analyses[self._current] def delete_all(self):