How to add the prefs dialog