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-30870: IDLE: Change sample font when select by key-up/down #2617

Merged
merged 4 commits into from
Jul 9, 2017

Conversation

mlouielu
Copy link
Contributor

@mlouielu mlouielu commented Jul 7, 2017

No description provided.

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 am about to submit a revision with the changes indicated, plus replacing list_fonts, a verb, with fontlist, a noun, plus a line to activate the current font, and a change to focus specifically on fontlist. Otherwise, keys do not work on windows until a font is clicked to focus and activate. Also will add NEWS file.

I plan to then work on tests. But not tonight. I hope to merge this tomorrow.

'<ButtonRelease-1>', self.on_list_fonts_button_release)
self.list_fonts.bind('<ButtonRelease-1>', self.on_list_fonts_button_release)
self.list_fonts.bind('<KeyRelease-Up>', self.on_list_fonts_key_release)
self.list_fonts.bind('<KeyRelease-Down>', self.on_list_fonts_key_release)
Copy link
Member

Choose a reason for hiding this comment

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

I replaced these with one binding to <>

font = self.list_fonts.get(ACTIVE)
self.font_name.set(font.lower())
self.set_font_sample()

Copy link
Member

Choose a reason for hiding this comment

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

I replaced both functions with one that used event.type to select the index.

@terryjreedy terryjreedy merged commit bb2bae8 into python:master Jul 9, 2017
@terryjreedy
Copy link
Member

Manual test passed. Effort to write unittest failed. Will add post to issue.

terryjreedy pushed a commit to terryjreedy/cpython that referenced this pull request Jul 9, 2017
terryjreedy added a commit that referenced this pull request Jul 9, 2017
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