Change how the program is exited when quit is clicked.