Commit 5f28e8fb authored by Steven M. Gava's avatar Steven M. Gava

extension config reading by configDialog and

beginning of configuration saving
parent 7bb1c9a1
......@@ -27,12 +27,13 @@
# from the default file.
[General]
run-in-separate-process= 1
help-browser= ""
editor-on-startup= 1
#run-in-separate-process= 1
#help-browser= ""
[HelpFiles]
idle="IDLE _Help",""
python="_Python Documentation",""
#idle="IDLE _Help",""
#python="_Python Documentation",""
#additional help sources
1=
2=
......@@ -46,7 +47,6 @@ python="_Python Documentation",""
10=
[EditorWindow]
editor-on-startup= 0
width= 80
height= 30
font= courier
......
This diff is collapsed.
......@@ -23,7 +23,7 @@ class IdleConfParser(ConfigParser):
self.file=cfgFile
ConfigParser.__init__(self,defaults=cfgDefaults)
def Get(self, section, option, type=None): #,default=None)
def Get(self, section, option, type=None):
"""
Get an option value for given section/option or return default.
If type is specified, return as type.
......@@ -143,9 +143,9 @@ class IdleConf:
Get a list of sections from either the user or default config for
the given config type.
configSet must be either 'user' or 'default'
configType must be one of ('extensions','highlight','keys')
configType must be one of ('main','extensions','highlight','keys')
"""
if not (configType in ('extensions','highlight','keys')):
if not (configType in ('main','extensions','highlight','keys')):
raise 'Invalid configType specified'
if configSet == 'user':
cfgParser=self.userCfg[configType]
......@@ -224,7 +224,8 @@ class IdleConf:
if activeOnly:
activeExtns=[]
for extn in extns:
if self.GetOption('extensions',extn,'enable',default=1,type='bool'):
if self.GetOption('extensions',extn,'enable',default=1,
type='bool'):
#the extension is enabled
activeExtns.append(extn)
return activeExtns
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment