mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #16511: Use default IDLE width and height if config param is not valid.
Patch Serhiy Storchaka.
This commit is contained in:
parent
1c6c90fc73
commit
d8590ff209
4 changed files with 48 additions and 27 deletions
|
|
@ -947,7 +947,7 @@ class ConfigDialog(Toplevel):
|
|||
self.listFontName.select_anchor(currentFontIndex)
|
||||
##font size dropdown
|
||||
fontSize=idleConf.GetOption('main','EditorWindow','font-size',
|
||||
default='10')
|
||||
type='int', default='10')
|
||||
self.optMenuFontSize.SetMenu(('7','8','9','10','11','12','13','14',
|
||||
'16','18','20','22'),fontSize )
|
||||
##fontWeight
|
||||
|
|
@ -1033,10 +1033,13 @@ class ConfigDialog(Toplevel):
|
|||
self.autoSave.set(idleConf.GetOption('main', 'General', 'autosave',
|
||||
default=0, type='bool'))
|
||||
#initial window size
|
||||
self.winWidth.set(idleConf.GetOption('main','EditorWindow','width'))
|
||||
self.winHeight.set(idleConf.GetOption('main','EditorWindow','height'))
|
||||
self.winWidth.set(idleConf.GetOption('main','EditorWindow','width',
|
||||
type='int'))
|
||||
self.winHeight.set(idleConf.GetOption('main','EditorWindow','height',
|
||||
type='int'))
|
||||
#initial paragraph reformat size
|
||||
self.paraWidth.set(idleConf.GetOption('main','FormatParagraph','paragraph'))
|
||||
self.paraWidth.set(idleConf.GetOption('main','FormatParagraph','paragraph',
|
||||
type='int'))
|
||||
# default source encoding
|
||||
self.encoding.set(idleConf.GetOption('main', 'EditorWindow',
|
||||
'encoding', default='none'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue