diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-02-11 01:27:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 01:27:31 (GMT) |
commit | c372f9b9e758a22608b8df33423b7413d224fdad (patch) | |
tree | cd7ef8e82a2f75a865aa2bfdf4d7926d027e1805 /Lib | |
parent | 4d4301782cbc789eedc5b76741d1028df579cfa5 (diff) | |
download | cpython-c372f9b9e758a22608b8df33423b7413d224fdad.zip cpython-c372f9b9e758a22608b8df33423b7413d224fdad.tar.gz cpython-c372f9b9e758a22608b8df33423b7413d224fdad.tar.bz2 |
bpo-39600: Adjust code, add idlelib/NEWS item (GH-18449)
Complete previous patch.
(cherry picked from commit 96ce22706735779cf8cc46eaaa5ac61359364b5a)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/NEWS.txt | 2 | ||||
-rw-r--r-- | Lib/idlelib/configdialog.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 1fc9e0f..9cf5634 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ Released on 2019-12-16? ====================================== +bpo-39600: Remove duplicate font names from configuration list. + bpo-38792: Close a shell calltip if a :exc:`KeyboardInterrupt` or shell restart occurs. Patch by Zackery Spytz. diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index 7b844f0..9d5c2cd 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -606,10 +606,8 @@ class FontPage(Frame): font_size = configured_font[1] font_bold = configured_font[2]=='bold' - # Set editor font selection list and font_name. - fonts = tkFont.families(self) - # remove duplicated names and sort - fonts = sorted(set(fonts)) + # Set sorted no-duplicate editor font selection list and font_name. + fonts = sorted(set(tkFont.families(self))) for font in fonts: self.fontlist.insert(END, font) self.font_name.set(font_name) |