Improve coding style in PreferencesDialog