diff options
author | Steven M. Gava <elguavas@python.net> | 2002-03-02 07:16:21 (GMT) |
---|---|---|
committer | Steven M. Gava <elguavas@python.net> | 2002-03-02 07:16:21 (GMT) |
commit | b77d343bc846c2049a4cffb1dfd65eb49d1728b4 (patch) | |
tree | a51c275c42fbca32c9bf3d43d4dfe8c66c3abe86 /Lib/idlelib/PyShell.py | |
parent | 03b18834c33dff7b231a22e5da28c8a9f250d1d3 (diff) | |
download | cpython-b77d343bc846c2049a4cffb1dfd65eb49d1728b4.zip cpython-b77d343bc846c2049a4cffb1dfd65eb49d1728b4.tar.gz cpython-b77d343bc846c2049a4cffb1dfd65eb49d1728b4.tar.bz2 |
First work on making config changes dynamic,
dynamic theme changes
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r-- | Lib/idlelib/PyShell.py | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 9333ea9..fa4bb3d 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -134,23 +134,27 @@ class PyShellFileList(FileList): class ModifiedColorDelegator(ColorDelegator): # Colorizer for the shell window itself + + def __init__(self): + ColorDelegator.__init__(self) + self.LoadTagDefs() def recolorize_main(self): self.tag_remove("TODO", "1.0", "iomark") self.tag_add("SYNC", "1.0", "iomark") ColorDelegator.recolorize_main(self) - - tagdefs = ColorDelegator.tagdefs.copy() - theme = idleConf.GetOption('main','Theme','name') - - tagdefs.update({ - "stdin": {'background':None,'foreground':None}, - "stdout": idleConf.GetHighlight(theme, "stdout"), - "stderr": idleConf.GetHighlight(theme, "stderr"), - "console": idleConf.GetHighlight(theme, "console"), - "ERROR": idleConf.GetHighlight(theme, "error"), - None: idleConf.GetHighlight(theme, "normal"), - }) + + def LoadTagDefs(self): + ColorDelegator.LoadTagDefs(self) + theme = idleConf.GetOption('main','Theme','name') + self.tagdefs.update({ + "stdin": {'background':None,'foreground':None}, + "stdout": idleConf.GetHighlight(theme, "stdout"), + "stderr": idleConf.GetHighlight(theme, "stderr"), + "console": idleConf.GetHighlight(theme, "console"), + "ERROR": idleConf.GetHighlight(theme, "error"), + None: idleConf.GetHighlight(theme, "normal"), + }) class ModifiedUndoDelegator(UndoDelegator): |