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 appropriate. 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 <[EMAIL PROTECTED]> <http://bugs.python.org/issue2053> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com