-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-27115: Use Query subclass for IDLE editor Goto #18871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This checks entry errors without closing the box.
Lib/idlelib/query.py
Outdated
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This __init__
seems unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this behave correctly when simply closing the dialog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Cursor stays put but selection is erroneously cleared. Fixed.
Lib/idlelib/NEWS.txt
Outdated
@@ -3,6 +3,9 @@ Released on 2020-10-05? | |||
====================================== | |||
|
|||
|
|||
bpo-27115: For Edit Go to Line, use a Query entry box subclass with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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