bpo-17535: IDLE editor line numbers (GH-14030)

This commit is contained in:
Tal Einat 2019-07-23 15:22:11 +03:00 committed by GitHub
parent 1ebee37dde
commit 7123ea009b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 891 additions and 80 deletions

View file

@ -319,6 +319,10 @@ class IdleConf:
'hit-background':'#000000',
'error-foreground':'#ffffff',
'error-background':'#000000',
'context-foreground':'#000000',
'context-background':'#ffffff',
'linenumber-foreground':'#000000',
'linenumber-background':'#ffffff',
#cursor (only foreground can be set)
'cursor-foreground':'#000000',
#shell window
@ -328,11 +332,11 @@ class IdleConf:
'stderr-background':'#ffffff',
'console-foreground':'#000000',
'console-background':'#ffffff',
'context-foreground':'#000000',
'context-background':'#ffffff',
}
for element in theme:
if not cfgParser.has_option(themeName, element):
if not (cfgParser.has_option(themeName, element) or
# Skip warning for new elements.
element.startswith(('context-', 'linenumber-'))):
# Print warning that will return a default color
warning = ('\n Warning: config.IdleConf.GetThemeDict'
' -\n problem retrieving theme element %r'