mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Issue #24759: IDLE requires tk 8.5 and availability ttk widgets.
Delete now unneeded tk version tests and code for older versions.
This commit is contained in:
parent
82ae15597f
commit
1080d13a7d
8 changed files with 38 additions and 40 deletions
|
@ -2,7 +2,6 @@ import time
|
|||
import re
|
||||
import keyword
|
||||
import builtins
|
||||
from tkinter import TkVersion
|
||||
from idlelib.delegator import Delegator
|
||||
from idlelib.config import idleConf
|
||||
|
||||
|
@ -49,11 +48,8 @@ def color_config(text): # Called from htest, Editor, and Turtle Demo.
|
|||
insertbackground=cursor_color,
|
||||
selectforeground=select_colors['foreground'],
|
||||
selectbackground=select_colors['background'],
|
||||
)
|
||||
if TkVersion >= 8.5:
|
||||
text.config(
|
||||
inactiveselectbackground=select_colors['background'])
|
||||
|
||||
inactiveselectbackground=select_colors['background'], # new in 8.5
|
||||
)
|
||||
|
||||
class ColorDelegator(Delegator):
|
||||
|
||||
|
@ -277,5 +273,8 @@ def _color_delegator(parent): # htest #
|
|||
p.insertfilter(d)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import unittest
|
||||
unittest.main('idlelib.idle_test.test_colorizer',
|
||||
verbosity=2, exit=False)
|
||||
from idlelib.idle_test.htest import run
|
||||
run(_color_delegator)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue