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

bpo-42721: Improve using simple dialogs without root window #23897

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Dec 22, 2020

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.

https://bugs.python.org/issue42721

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.
@serhiy-storchaka serhiy-storchaka force-pushed the simple-common-dialog-temporary-root branch from f1e7bfd to 2460120 Compare Dec 22, 2020
Copy link
Member

@terryjreedy terryjreedy left a comment

Half of review is on issue.

Lib/tkinter/commondialog.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Dec 24, 2020

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@serhiy-storchaka
Copy link
Member Author

@serhiy-storchaka serhiy-storchaka commented Dec 24, 2020

I have made the requested changes; please review again.

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Dec 24, 2020

Thanks for making the requested changes!

@terryjreedy: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from terryjreedy Dec 24, 2020
@serhiy-storchaka serhiy-storchaka merged commit 675c97e into python:master Dec 25, 2020
11 checks passed
@serhiy-storchaka serhiy-storchaka deleted the simple-common-dialog-temporary-root branch Dec 25, 2020
adorilson pushed a commit to adorilson/cpython that referenced this issue Mar 13, 2021
…-23897)

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed type-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants