Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
052937f0
Commit
052937f0
authored
Feb 11, 2002
by
Steven M. Gava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
further work on config saving
parent
ff34626a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
217 additions
and
76 deletions
+217
-76
Lib/idlelib/config-highlight.def
Lib/idlelib/config-highlight.def
+4
-4
Lib/idlelib/config-keys.def
Lib/idlelib/config-keys.def
+2
-1
Lib/idlelib/configDialog.py
Lib/idlelib/configDialog.py
+199
-68
Lib/idlelib/configHandler.py
Lib/idlelib/configHandler.py
+12
-3
No files found.
Lib/idlelib/config-highlight.def
View file @
052937f0
...
...
@@ -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
...
...
Lib/idlelib/config-keys.def
View file @
052937f0
...
...
@@ -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>
...
...
Lib/idlelib/configDialog.py
View file @
052937f0
This diff is collapsed.
Click to expand it.
Lib/idlelib/configHandler.py
View file @
052937f0
...
...
@@ -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
=
''
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment