#NEWLINE# def addListener( self , listener , iface = None ) : #NEWLINE# #INDENT# 'Adds the user change/window attach/window detach listener.\n\n        The user change listener allows one to get notification each time\n        L{setUser} is called.  The window attach listener is used to get\n        notifications each time a window is attached to the application\n        with L{addWindow}.  The window detach listener is used to get\n        notifications each time a window is remove from the application\n        with L{removeWindow}.\n        ' #NEWLINE# if ( isinstance ( listener , IUserChangeListener ) and ( ( iface is None ) or issubclass ( iface , IUserChangeListener ) ) ) : #NEWLINE# #INDENT# self . _userChangeListeners . append ( listener ) #NEWLINE# #UNINDENT# if ( isinstance ( listener , IWindowAttachListener ) and ( ( iface is None ) or issubclass ( iface , IWindowAttachListener ) ) ) : #NEWLINE# #INDENT# self . _windowAttachListeners . append ( listener ) #NEWLINE# #UNINDENT# if ( isinstance ( listener , IWindowDetachListener ) and ( ( iface is None ) or issubclass ( iface , IWindowDetachListener ) ) ) : #NEWLINE# #INDENT# self . _windowDetachListeners . append ( listener ) #NEWLINE# #UNINDENT# super ( Application , self ) . addListener ( listener , iface )