Skip to content

bpo-39050: The Help button in IDLE's config menu does not work #17611

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/idlelib/NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Released on 2020-10-05?
======================================


bpo-39050: Make Settings dialog Help button work again.

bpo-32989: Add tests for editor newline_and_indent_event method.
Remove dead code from pyparse find_good_parse_start method.

Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def help(self):
"""
page = self.note.tab(self.note.select(), option='text').strip()
view_text(self, title='Help for IDLE preferences',
text=help_common+help_pages.get(page, ''))
contents=help_common+help_pages.get(page, ''))

def deactivate_current_config(self):
"""Remove current key bindings.
Expand Down
11 changes: 11 additions & 0 deletions Lib/idlelib/idle_test/test_configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ def tearDownModule():
root.destroy()
root = dialog = None

class ConfigDialogTest(unittest.TestCase):

def test_help(self):
dialog.note.select(dialog.keyspage)
saved = configdialog.view_text
view = configdialog.view_text = Func()
dialog.help()
s = view.kwds['contents']
self.assertTrue(s.startswith('When you click'))
self.assertTrue(s.endswith('a different name.\n'))
configdialog.view_text = saved

class FontPageTest(unittest.TestCase):
"""Test that font widgets enable users to make font changes.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make IDLE Settings dialog Help button work again.