(self, window, event, data=None)
Handle a window close request
Handle a window close request
Handle a window close request
def on_delete_event(self, window, event, data=None):
        """Handle a window close request"""
        maker = Factory()
        if maker.isinstance(self.get_child(), 'Terminal'):
            if self.is_zoomed():
                return(self.confirm_close(window, _('window')))
            else:
                dbg('Window::on_delete_event: Only one child, closing is fine')
                return(False)
        elif maker.isinstance(self.get_child(), 'Container'):
            return(self.confirm_close(window, _('window')))
        else:
            dbg('unknown child: %s' % self.get_child())
def on_delete_event ( self , window , event , data = None ) : maker = Factory ( ) if maker . isinstance ( self . get_child ( ) , 'Terminal' ) : if self . is_zoomed ( ) : return ( self . confirm_close ( window , _ ( 'window' ) ) ) else : dbg ( 'Window::on_delete_event: Only one child, closing is fine' ) return ( False ) elif maker . isinstance ( self . get_child ( ) , 'Container' ) : return ( self . confirm_close ( window , _ ( 'window' ) ) ) else : dbg ( 'unknown child: %s' % self . get_child ( ) )