Skip to content
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

[3.10] bpo-46630: Fix initial focus of IDLE query dialogs (GH-31112) #31114

Merged
merged 1 commit into from Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Lib/idlelib/NEWS.txt
Expand Up @@ -4,6 +4,9 @@ Released on 2022-05-16
=========================


bpo-46630: Make query dialogs on Windows start with a cursor in the
entry box.

bpo-46591: Make the IDLE doc URL on the About IDLE dialog clickable.

bpo-45296: Clarify close, quit, and exit in IDLE. In the File menu,
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/query.py
Expand Up @@ -83,6 +83,7 @@ def __init__(self, parent, title, message, *, text0='', used_names={},

if not _utest:
self.deiconify() # Unhide now that geometry set.
self.entry.focus_set()
self.wait_window()

def create_widgets(self, ok_text='OK'): # Do not replace.
Expand All @@ -100,7 +101,6 @@ def create_widgets(self, ok_text='OK'): # Do not replace.
text=self.message)
self.entryvar = StringVar(self, self.text0)
self.entry = Entry(frame, width=30, textvariable=self.entryvar)
self.entry.focus_set()
self.error_font = Font(name='TkCaptionFont',
exists=True, root=self.parent)
self.entry_error = Label(frame, text=' ', foreground='red',
Expand Down
@@ -0,0 +1 @@
Make query dialogs on Windows start with a cursor in the entry box.