Implement basic support for saving the preferences window's state.