mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
more work to support new config system
This commit is contained in:
parent
dedbe255d3
commit
e16d94b77e
3 changed files with 121 additions and 87 deletions
|
@ -49,14 +49,6 @@ class IdleConfParser(ConfigParser):
|
|||
else: #return a default value
|
||||
return []
|
||||
|
||||
def GetHighlight(self, theme, element):
|
||||
fore = self.Get(theme, element + "-foreground")
|
||||
back = self.Get(theme, element + "-background")
|
||||
style = self.Ge(theme, element + "-fontStyle", default='')
|
||||
return {"fg": fore,
|
||||
"bg": back,
|
||||
"fStyle": style}
|
||||
|
||||
def Load(self):
|
||||
"""
|
||||
Load the configuration file from disk
|
||||
|
@ -160,7 +152,12 @@ class IdleConf:
|
|||
|
||||
return cfgParser.sections()
|
||||
|
||||
|
||||
def GetHighlight(self, theme, element):
|
||||
fore = self.GetOption('highlight', theme, element + "-foreground")
|
||||
back = self.GetOption('highlight', theme, element + "-background")
|
||||
return {"foreground": fore,
|
||||
"background": back}
|
||||
|
||||
def GetTheme(self, name=None):
|
||||
"""
|
||||
Gets the requested theme or returns a final fallback theme in case
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue