diff options
author | Steven M. Gava <elguavas@python.net> | 2001-11-04 07:03:08 (GMT) |
---|---|---|
committer | Steven M. Gava <elguavas@python.net> | 2001-11-04 07:03:08 (GMT) |
commit | 9930061ce28b1fc60d267ae3474c74a41e655cd5 (patch) | |
tree | 019243ddaeed08681457aeb96fa0a94be23b792f /Lib/idlelib/configHandler.py | |
parent | c99213f99369020c06bb75721fd41e2681445834 (diff) | |
download | cpython-9930061ce28b1fc60d267ae3474c74a41e655cd5.zip cpython-9930061ce28b1fc60d267ae3474c74a41e655cd5.tar.gz cpython-9930061ce28b1fc60d267ae3474c74a41e655cd5.tar.bz2 |
further config system work
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r-- | Lib/idlelib/configHandler.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index e32c6e6..4539627 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -5,7 +5,7 @@ ## ##---------------------------------------------------------------------------## """ -Provides access to configuration information +Provides access to stored idle configuration information """ import os @@ -153,8 +153,17 @@ class IdleConf: return cfgParser.sections() def GetHighlight(self, theme, element): + #get some fallback defaults + defaultFg=self.GetOption('highlight', theme, 'normal' + "-foreground", + default='#000000') + defaultBg=self.GetOption('highlight', theme, 'normal' + "-background", + default='#ffffff') + #try for requested element colours fore = self.GetOption('highlight', theme, element + "-foreground") back = self.GetOption('highlight', theme, element + "-background") + #fall back if required + if not fore: fore=defaultFg + if not back: back=defaultBg return {"foreground": fore, "background": back} |