New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-31050: IDLE: Factor GenPage class from ConfigDialog #2952
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blurb with
bpo-31004: Factor FontPage(Frame) class from ConfigDialog.
The slightly modified tests continue to pass.
Patch by Cheryl Sabella.
Lib/idlelib/configdialog.py
Outdated
|
||
def __init__(self, parent): | ||
super().__init__(parent) | ||
self.parent = parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete unneeded line. See below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Lib/idlelib/configdialog.py
Outdated
(*)helplist: ListBox | ||
scroll_helplist: Scrollbar | ||
""" | ||
parent = self.parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete and replace 'parent' with 'self' in the 4 statements below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Lib/idlelib/configdialog.py
Outdated
|
||
# Create widgets: | ||
# body and section frames. | ||
frame = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete and carefully replace '(frame,' with '(self,' in the next four statements. (I believe that these are the only one that need it.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Lib/idlelib/configdialog.py
Outdated
self.button_helplist_add.pack(side=TOP, anchor=W) | ||
self.button_helplist_remove.pack(side=TOP, anchor=W, pady=5) | ||
|
||
return frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete return line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Lib/idlelib/configdialog.py
Outdated
StringVar(parent), ('main', 'EditorWindow', 'height')) | ||
|
||
# Create widgets: | ||
# body and section frames. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete 'body and '
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Lib/idlelib/configdialog.py
Outdated
# for num in range(1, len(self.user_helplist) + 1): | ||
# changes.add_option( | ||
# 'main', 'HelpFiles', str(num), | ||
# ';'.join(self.user_helplist[num-1][:2])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With tests passing, delete the entire commented out block above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
page = cls.page = dialog.genpage | ||
dialog.note.select(page) | ||
page.set = page.set_add_delete_state = Func() | ||
page.upc = page.update_help_changes = Func() | ||
|
||
@classmethod | ||
def tearDownClass(cls): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add 'page = cls.page' and simplify next 4 lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Lib/idlelib/configdialog.py
Outdated
note.add(self.keyspage, text=' Keys ') | ||
note.add(self.genpage, text=' General ') | ||
note.add(self.extpage, text='Extensions') | ||
note.add(self.fontpage, text='Fonts/Tabs', underline=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert the underline additions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested each widget on the page and checked that the corresponding change had been made in my user config-main. (Automating this would be the subject of a #24845 spinoff.)
https://bugs.python.org/issue31050