Skip to content
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

Merged
merged 2 commits into from Jul 30, 2017

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Jul 30, 2017

Copy link
Member

@terryjreedy terryjreedy left a 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.


def __init__(self, parent):
super().__init__(parent)
self.parent = parent
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done

(*)helplist: ListBox
scroll_helplist: Scrollbar
"""
parent = self.parent
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done


# Create widgets:
# body and section frames.
frame = self
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

self.button_helplist_add.pack(side=TOP, anchor=W)
self.button_helplist_remove.pack(side=TOP, anchor=W, pady=5)

return frame
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

StringVar(parent), ('main', 'EditorWindow', 'height'))

# Create widgets:
# body and section frames.
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

# for num in range(1, len(self.user_helplist) + 1):
# changes.add_option(
# 'main', 'HelpFiles', str(num),
# ';'.join(self.user_helplist[num-1][:2]))
Copy link
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
Contributor Author

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):
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@terryjreedy terryjreedy left a 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.)

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

None yet

3 participants