bpo-27115: Use Query subclass for IDLE editor Goto#18871
Conversation
This checks entry errors without closing the box.
| "Get a positive line number for editor Go To Line." | ||
| # Used in editor.EditorWindow.goto_line_event. | ||
|
|
||
| def __init__(self, parent, title, message, *, _htest=False, _utest=False): |
There was a problem hiding this comment.
This __init__ seems unnecessary.
There was a problem hiding this comment.
Right, I copied and edited from an existing subclass that does need it. Deleted.
| text.bell() | ||
| return "break" | ||
|
|
||
| lineno = query.Goto( |
There was a problem hiding this comment.
Does this behave correctly when simply closing the dialog?
There was a problem hiding this comment.
No. Cursor stays put but selection is erroneously cleared. Fixed.
| ====================================== | ||
|
|
||
|
|
||
| bpo-27115: For Edit Go to Line, use a Query entry box subclass with |
There was a problem hiding this comment.
"Edit Go to Line" is a bit awkward; IMO "Go to Line" is sufficient and clearer.
(Relevant to the NEWS entry as well.)
There was a problem hiding this comment.
Changed. Thank you for the comments.
|
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog. The new box checks for positivity before returning. (cherry picked from commit 363fab8) Co-authored-by: Terry Jan Reedy <[email protected]>
|
GH-18886 is a backport of this pull request to the 3.8 branch. |
|
GH-18887 is a backport of this pull request to the 3.7 branch. |
Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog. The new box checks for positivity before returning. (cherry picked from commit 363fab8) Co-authored-by: Terry Jan Reedy <[email protected]>
Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog. The new box checks for positivity before returning. (cherry picked from commit 363fab8) Co-authored-by: Terry Jan Reedy <[email protected]>
Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog. The new box checks for positivity before returning. (cherry picked from commit 363fab8) Co-authored-by: Terry Jan Reedy <[email protected]>
Replace tkinter tkSimpleDialog.askinteger with IDLE query dialog.
The new box checks for positivity before returning.
https://bugs.python.org/issue27115