#20 OptionsDialog adds itself as window listener. Fixes #20.