#NEWLINE# def _on_window_closing( self , window , trait_name , event ) : #NEWLINE# #INDENT# ' Dynamic trait change handler. ' #NEWLINE# self . window_closing = window_event = VetoableWindowEvent ( window = window ) #NEWLINE# if event . veto : #NEWLINE# #INDENT# event . veto = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( self . windows ) == 1 ) : #NEWLINE# #INDENT# if ( not self . _explicit_exit ) : #NEWLINE# #INDENT# self . exiting = window_event = Vetoable ( ) #NEWLINE# if window_event . veto : #NEWLINE# #INDENT# event . veto = True #NEWLINE# #UNINDENT# #UNINDENT# if ( not event . veto ) : #NEWLINE# #INDENT# self . _save_window_layout ( window ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return