[New-bugs-announce] [issue2053] IDLE - standardize dialogs

Tal Einat report at bugs.python.org
Sat Feb 9 01:10:21 CET 2008

New submission from Tal Einat:

In many places in the code, tkMessageBox dialogs were being used
directly, with the master (parent) widget being set explicitly to the
EditorWindow's text widget. Only in some cases was the focus being set
to the text widget afterwards, although in most this is the Right Thing
To Do.

This patch adds a decorator which wraps a tkMessage box (or similar)
function to use the EditorWindow's text widget as a parent by default
and set focus back to it afterwards. This is used to wrap the showerror
and ask* methods. It also changes the code to use these methods wherever

All in all, the change in functionality is that the dialogs' parent
widget will always be the text widget, and that focus will always be
returned to it. This makes the interface more consistent. As a bonus, a
lot of repetitive cruft is removed from the code, and writing extensions
is made another bit simpler.

components: IDLE
files: IDLE_standardize_dialogs.080208.patch
messages: 62214
nosy: kbk, taleinat
severity: normal
status: open
title: IDLE - standardize dialogs
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file9394/IDLE_standardize_dialogs.080208.patch

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list