Kaydet (Commit) 052937f0 authored tarafından Steven M. Gava's avatar Steven M. Gava

further work on config saving

üst ff34626a
......@@ -12,7 +12,7 @@ string-foreground= #00aa00
string-background= #ffffff
definition-foreground= #0000ff
definition-background= #ffffff
hilite-foreground= #ffffff
hilite-foreground= #000000
hilite-background= gray
break-foreground= #ff7777
break-background= #ffffff
......@@ -31,8 +31,8 @@ console-foreground= #770000
console-background= #ffffff
[IDLE New]
bold-foreground= #000000
bold-background= #ffffff
normal-foreground= #000000
normal-background= #ffffff
keyword-foreground= #ff7700
keyword-background= #ffffff
comment-foreground= #dd0000
......@@ -41,7 +41,7 @@ string-foreground= #00aa00
string-background= #ffffff
definition-foreground= #0000ff
definition-background= #ffffff
hilite-foreground= #ffffff
hilite-foreground= #000000
hilite-background= gray
break-foreground= #ff7777
break-background= #ffffff
......
......@@ -9,7 +9,7 @@
copy=<Control-c> <Control-C>
cut=<Control-x> <Control-X>
paste=<Control-v> <Control-V>
beginning-of-line=<Control-a> <Home>
beginning-of-line= <Home>
center-insert=<Control-l>
close-all-windows=<Control-q>
close-window=<Alt-F4>
......@@ -60,6 +60,7 @@ plain-newline-and-indent=<Control-j>
python-docs=<Control-h>
python-context-help=<Control-Shift-h>
redo=<Alt-z> <Meta-z>
remove-selection=<Escape>
save-copy-of-window-as-file=<Control-x><w>
save-window-as-file=<Control-x><Control-w>
save-window=<Control-x><Control-s>
......
This diff is collapsed.
......@@ -206,7 +206,7 @@ class IdleConf:
return self.userCfg[configType].Get(section, option, type=type)
elif self.defaultCfg[configType].has_option(section,option):
return self.defaultCfg[configType].Get(section, option, type=type)
else:
else: #returning default, print warning
warning=('\n Warning: configHandler.py - IdleConf.GetOption -\n'+
' problem retrieving configration option '+`option`+'\n'+
' from section '+`section`+'.\n'+
......@@ -311,7 +311,16 @@ class IdleConf:
'console-foreground':'#000000',
'console-background':'#ffffff' }
for element in theme.keys():
colour=cfgParser.Get(type,themeName,element,default=theme[element])
print 'themeName:',themeName,'theme exists:',cfgParser.has_section(
themeName)
if not cfgParser.has_option(themeName,element):
#we are going to return a default, print warning
warning=('\n Warning: configHandler.py - IdleConf.GetThemeDict'+
' -\n problem retrieving theme element '+`element`+
'\n from theme '+`themeName`+'.\n'+
' returning default value: '+`theme[element]`+'\n')
sys.stderr.write(warning)
colour=cfgParser.Get(themeName,element,default=theme[element])
theme[element]=colour
return theme
......@@ -323,7 +332,7 @@ class IdleConf:
def CurrentKeys(self):
"""
Returns the name of the currently active theme
Returns the name of the currently active key set
"""
return self.GetOption('main','Keys','name',default='')
......
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