Rewritten to use DialogUtils