diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-06-21 22:41:38 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-06-21 22:41:38 (GMT) |
commit | b60adc54d4f248d71d831d14e11cc77fe72c281e (patch) | |
tree | 40991b8eacb5eea9cfe04e7dbb2cb20149b868f2 /Lib/idlelib/multicall.py | |
parent | aacd53f6cb96fe8c4fe9ce894f22e25f356a97c3 (diff) | |
download | cpython-b60adc54d4f248d71d831d14e11cc77fe72c281e.zip cpython-b60adc54d4f248d71d831d14e11cc77fe72c281e.tar.gz cpython-b60adc54d4f248d71d831d14e11cc77fe72c281e.tar.bz2 |
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.
Diffstat (limited to 'Lib/idlelib/multicall.py')
-rw-r--r-- | Lib/idlelib/multicall.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/idlelib/multicall.py b/Lib/idlelib/multicall.py index 8462854..bf02f59 100644 --- a/Lib/idlelib/multicall.py +++ b/Lib/idlelib/multicall.py @@ -414,12 +414,12 @@ def MultiCallCreator(widget): return MultiCall -def _multi_call(parent): - root = tkinter.Tk() - root.title("Test MultiCall") +def _multi_call(parent): # htest # + top = tkinter.Toplevel(parent) + top.title("Test MultiCall") width, height, x, y = list(map(int, re.split('[x+]', parent.geometry()))) - root.geometry("+%d+%d"%(x, y + 150)) - text = MultiCallCreator(tkinter.Text)(root) + top.geometry("+%d+%d"%(x, y + 150)) + text = MultiCallCreator(tkinter.Text)(top) text.pack() def bindseq(seq, n=[0]): def handler(event): @@ -439,7 +439,6 @@ def _multi_call(parent): bindseq("<FocusOut>") bindseq("<Enter>") bindseq("<Leave>") - root.mainloop() if __name__ == "__main__": from idlelib.idle_test.htest import run |