Commit 052937f0 authored by Steven M. Gava's avatar Steven M. Gava

further work on config saving

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