int run_and_close()
See run(). The only difference is that this function calls close() before returning if the dialog was not already closed.