Author: bugman Date: Thu Jul 21 11:42:29 2011 New Revision: 13800 URL: http://svn.gna.org/viewcvs/relax?rev=13800&view=rev Log: The observer status.observers.gui_analysis is now notified of all changes to the analysis tabs. 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=13800&r1=13799&r2=13800&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/__init__.py (original) +++ branches/gui_testing/gui/analyses/__init__.py Thu Jul 21 11:42:29 2011 @@ -136,6 +136,9 @@ # Remove the last analysis, until there is nothing left. self.delete_analysis(self._num_analyses-1) + # Notify the observers of the change. + status.observers.gui_analysis.notify() + def delete_analysis(self, index): """Delete the analysis tab and data store corresponding to the index. @@ -170,6 +173,9 @@ # No more analyses, so in the initial state. if self._num_analyses == 0: self.set_init_state() + + # Notify the observers of the change. + status.observers.gui_analysis.notify() def get_page_from_name(self, name): @@ -232,6 +238,9 @@ # Reset the switching flag. self._switch_flag = True + # Notify the observers of the change. + status.observers.gui_analysis.notify() + def menu_close(self, event): """Close the currently opened analysis. @@ -368,6 +377,9 @@ # Reset the main window layout. self.gui.Layout() + # Notify the observers of the change. + status.observers.gui_analysis.notify() + def on_page_change(self, event): """Handle page changes. @@ -394,6 +406,9 @@ # Normal operation. event.Skip() + + # Notify the observers of the change. + status.observers.gui_analysis.notify() def page_index_from_pipe(self, pipe): @@ -462,6 +477,9 @@ # Switch to the page. self.switch_page(index) + # Notify the observers of the change. + status.observers.gui_analysis.notify() + def reset(self): """Reset all the analyses to an initial state.""" @@ -518,6 +536,10 @@ # Switch to the page. self.notebook.SetSelection(self._current) + # Notify the observers of the change. + status.observers.gui_analysis.notify() + + class Status_container(ListType): """The status container object."""