cpython: a7c9869a5114 (original) (raw)

Mercurial > cpython

changeset 81011:a7c9869a5114

Issue #16511: Use default IDLE width and height if config param is not valid. Patch Serhiy Storchaka. [#16511]

Andrew Svetlov andrew.svetlov@gmail.com
date Mon, 24 Dec 2012 13:17:11 +0200
parents 76c5f3371db6(current diff)10656b0975b3(diff)
children deee9f0a4b98 1fb26db7d719 6cfe2982de42
files Lib/idlelib/EditorWindow.py Misc/NEWS
diffstat 5 files changed, 65 insertions(+), 35 deletions(-)[+] [-] Lib/idlelib/EditorWindow.py 21 Lib/idlelib/FormatParagraph.py 6 Lib/idlelib/configDialog.py 19 Lib/idlelib/configHandler.py 51 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -170,13 +170,15 @@ class EditorWindow(object): 'recent-files.lst') self.text_frame = text_frame = Frame(top) self.vbar = vbar = Scrollbar(text_frame, name='vbar')

@@ -253,7 +255,8 @@ class EditorWindow(object): if idleConf.GetOption('main', 'EditorWindow', 'font-bold', type='bool'): fontWeight='bold' text.config(font=(idleConf.GetOption('main', 'EditorWindow', 'font'),

@@ -268,7 +271,8 @@ class EditorWindow(object): # Although use-spaces=0 can be configured manually in config-main.def, # configuration of tabs v. spaces is not supported in the configuration # dialog. IDLE promotes the preferred Python indentation: use spaces

# tabwidth is the display width of a literal tab character. @@ -382,9 +386,11 @@ class EditorWindow(object): self.text.tag_remove("sel", "1.0", "end") else: if not self.text.index("sel.first"):

@@ -766,7 +772,8 @@ class EditorWindow(object): if idleConf.GetOption('main','EditorWindow','font-bold',type='bool'): fontWeight='bold' self.text.config(font=(idleConf.GetOption('main','EditorWindow','font'),

def RemoveKeybindings(self):

--- a/Lib/idlelib/FormatParagraph.py +++ b/Lib/idlelib/FormatParagraph.py @@ -32,7 +32,8 @@ class FormatParagraph: self.editwin = None def format_paragraph_event(self, event):

@@ -46,7 +47,8 @@ class FormatParagraph: lines = data.split("\n") lines = map(lambda st, l=len(comment_header): st[l:], lines) data = "\n".join(lines)

--- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -925,7 +925,7 @@ class ConfigDialog(Toplevel): for font in fonts: self.listFontName.insert(END,font) configuredFont=idleConf.GetOption('main','EditorWindow','font',

@@ -935,13 +935,13 @@ class ConfigDialog(Toplevel): self.listFontName.select_set(currentFontIndex) self.listFontName.select_anchor(currentFontIndex) ##font size dropdown

@@ -1022,10 +1022,13 @@ class ConfigDialog(Toplevel): self.autoSave.set(idleConf.GetOption('main', 'General', 'autosave', default=0, type='bool')) #initial window size

--- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -238,24 +238,39 @@ class IdleConf: printed to stderr. """

def SetOption(self, configType, section, option, value): """In user's config file, set section's option to value.

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -178,6 +178,9 @@ Core and Builtins Library ------- +- Issue #16511: Use default IDLE width and height if config param is not valid.