Skip to content

bpo-31050: IDLE: Factor GenPage class from ConfigDialog#2952

Merged
terryjreedy merged 2 commits into
python:masterfrom
csabella:bpo31050
Jul 30, 2017
Merged

bpo-31050: IDLE: Factor GenPage class from ConfigDialog#2952
terryjreedy merged 2 commits into
python:masterfrom
csabella:bpo31050

Conversation

@csabella

@csabella csabella commented Jul 30, 2017

Copy link
Copy Markdown
Contributor

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

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.

Comment thread Lib/idlelib/configdialog.py Outdated

def __init__(self, parent):
super().__init__(parent)
self.parent = parent

@terryjreedy terryjreedy Jul 30, 2017

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread Lib/idlelib/configdialog.py Outdated
(*)helplist: ListBox
scroll_helplist: Scrollbar
"""
parent = self.parent

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread Lib/idlelib/configdialog.py Outdated

# Create widgets:
# body and section frames.
frame = self

Copy link
Copy Markdown
Member

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.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 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

@terryjreedy terryjreedy Jul 30, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete return line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread Lib/idlelib/configdialog.py Outdated
StringVar(parent), ('main', 'EditorWindow', 'height'))

# Create widgets:
# body and section frames.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete 'body and '

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 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]))

@terryjreedy terryjreedy Jul 30, 2017

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

page.upc = page.update_help_changes = Func()

@classmethod
def tearDownClass(cls):

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread 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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert the underline additions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

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.)

@terryjreedy terryjreedy changed the title bpo-31050: IDLE: Factor out GenTab class from ConfigDialog bpo-31050: IDLE: Factor GenPage class from ConfigDialog Jul 30, 2017
@terryjreedy terryjreedy merged commit e8eb17b into python:master Jul 30, 2017
terryjreedy pushed a commit to terryjreedy/cpython that referenced this pull request Jul 30, 2017
…GH-2952)

The slightly modified tests for the General tab continue to pass.
Patch by Cheryl Sabella.
(cherry picked from commit e8eb17b)
terryjreedy added a commit that referenced this pull request Jul 30, 2017
… (#2955)

The slightly modified tests for the General tab continue to pass.
Patch by Cheryl Sabella.
(cherry picked from commit e8eb17b)
@csabella csabella deleted the bpo31050 branch July 31, 2017 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants