added the quit dialog box when button close is pressed