'Handle the close event.'

def close(self, info, is_ok):

    if info.object.queue.unfinished_tasks:
        information(None, 'Can    not    close    the    window    while    saving    is    still    in    progress.    Please    wait    until    all    MRIs    are    processed.', 'Saving    Still    in    Progress')
        return False
    else:
        try:
            info.object.save_config()
        except Exception as exc:
            warnings.warn(('Error    saving    GUI    configuration:\n%s' % (exc,)))
        return True
