diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-03 23:06:45 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-03 23:06:45 (GMT) |
commit | e81f28b630a7192207b9ac9a6813c8d29f1bed6c (patch) | |
tree | 470d5306ede24a1819eefb1fff1fb3abae7446f3 /Tools/idle/PyShell.py | |
parent | 583abb80277d6ab5c8ad887477c12a3139e6f5f9 (diff) | |
download | cpython-e81f28b630a7192207b9ac9a6813c8d29f1bed6c.zip cpython-e81f28b630a7192207b9ac9a6813c8d29f1bed6c.tar.gz cpython-e81f28b630a7192207b9ac9a6813c8d29f1bed6c.tar.bz2 |
migrate to use of IdleConf and config files to set options
idle.py:
Load the config files before anything else happens
XXX Need to define standard way to get files relative to the
IDLE install dir
PyShell.py:
ColorDelegator.py:
Get color defns out of IdleConf instead of IdlePrefs
EditorWindow.py:
Replace hard-coded font & window size with config options
Get extension names via IdleConf.getextensions
extend.py:
Obsolete. Extensions defined in config file.
ParenMatch.py:
Use config file for extension options.
Revise comment about parser requirements.
Simplify logic on find returning None.
Diffstat (limited to 'Tools/idle/PyShell.py')
-rw-r--r-- | Tools/idle/PyShell.py | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Tools/idle/PyShell.py b/Tools/idle/PyShell.py index 8c93f4d..1e2f1ae 100644 --- a/Tools/idle/PyShell.py +++ b/Tools/idle/PyShell.py @@ -16,6 +16,7 @@ from EditorWindow import EditorWindow, fixwordbreaks from FileList import FileList from ColorDelegator import ColorDelegator from OutputWindow import OutputWindow +from IdleConf import IdleConf import idlever # We need to patch linecache.checkcache, because we don't want it @@ -114,21 +115,15 @@ class ModifiedColorDelegator(ColorDelegator): ColorDelegator.recolorize_main(self) tagdefs = ColorDelegator.tagdefs.copy() - cprefs = ColorDelegator.cprefs + cconf = IdleConf.getsection('Colors') tagdefs.update({ - "stdin": {"foreground": cprefs.CStdIn[0], - "background": cprefs.CStdIn[1]}, - "stdout": {"foreground": cprefs.CStdOut[0], - "background": cprefs.CStdOut[1]}, - "stderr": {"foreground": cprefs.CStdErr[0], - "background": cprefs.CStdErr[1]}, - "console": {"foreground": cprefs.CConsole[0], - "background": cprefs.CConsole[1]}, - "ERROR": {"background": cprefs.CError[0], - "background": cprefs.CError[1]}, - None: {"foreground": cprefs.CNormal[0], - "background": cprefs.CNormal[1]}, + "stdin": cconf.getcolor("stdin"), + "stdout": cconf.getcolor("stdout"), + "stderr": cconf.getcolor("stderr"), + "console": cconf.getcolor("console"), + "ERROR": cconf.getcolor("ERROR"), + None: cconf.getcolor("normal"), }) |