mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
Issue #24137: Run IDLE, test_idle, and htest with tkinter default root disabled.
Fix code and tests that fail with this restriction. Fix htests to not create a second and redundant root and mainloop.
This commit is contained in:
parent
aacd53f6cb
commit
b60adc54d4
15 changed files with 92 additions and 84 deletions
|
@ -1547,7 +1547,9 @@ def main():
|
|||
enable_edit = enable_edit or edit_start
|
||||
enable_shell = enable_shell or not enable_edit
|
||||
|
||||
# start editor and/or shell windows:
|
||||
# Setup root.
|
||||
if use_subprocess: # Don't break user code run in IDLE process
|
||||
NoDefaultRoot()
|
||||
root = Tk(className="Idle")
|
||||
root.withdraw()
|
||||
|
||||
|
@ -1563,6 +1565,7 @@ def main():
|
|||
icons = [PhotoImage(file=iconfile) for iconfile in iconfiles]
|
||||
root.wm_iconphoto(True, *icons)
|
||||
|
||||
# start editor and/or shell windows:
|
||||
fixwordbreaks(root)
|
||||
fix_x11_paste(root)
|
||||
flist = PyShellFileList(root)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue