987579: Re-arranged preferences dialog

Re-submitted because the other pull request did not have the correct code for some reason.