Connect the save method to the settings dialog closing