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 @@ ...@@ -27,12 +27,13 @@
# from the default file. # from the default file.
[General] [General]
run-in-separate-process= 1 editor-on-startup= 1
help-browser= "" #run-in-separate-process= 1
#help-browser= ""
[HelpFiles] [HelpFiles]
idle="IDLE _Help","" #idle="IDLE _Help",""
python="_Python Documentation","" #python="_Python Documentation",""
#additional help sources #additional help sources
1= 1=
2= 2=
...@@ -46,7 +47,6 @@ python="_Python Documentation","" ...@@ -46,7 +47,6 @@ python="_Python Documentation",""
10= 10=
[EditorWindow] [EditorWindow]
editor-on-startup= 0
width= 80 width= 80
height= 30 height= 30
font= courier font= courier
......
This diff is collapsed.
...@@ -23,7 +23,7 @@ class IdleConfParser(ConfigParser): ...@@ -23,7 +23,7 @@ class IdleConfParser(ConfigParser):
self.file=cfgFile self.file=cfgFile
ConfigParser.__init__(self,defaults=cfgDefaults) 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. Get an option value for given section/option or return default.
If type is specified, return as type. If type is specified, return as type.
...@@ -143,9 +143,9 @@ class IdleConf: ...@@ -143,9 +143,9 @@ class IdleConf:
Get a list of sections from either the user or default config for Get a list of sections from either the user or default config for
the given config type. the given config type.
configSet must be either 'user' or 'default' 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' raise 'Invalid configType specified'
if configSet == 'user': if configSet == 'user':
cfgParser=self.userCfg[configType] cfgParser=self.userCfg[configType]
...@@ -224,7 +224,8 @@ class IdleConf: ...@@ -224,7 +224,8 @@ class IdleConf:
if activeOnly: if activeOnly:
activeExtns=[] activeExtns=[]
for extn in extns: 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 #the extension is enabled
activeExtns.append(extn) activeExtns.append(extn)
return activeExtns 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