Code polish in _dialogs.py