]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39050: The Help button in IDLE's config menu works again (GH-17611)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 23 Jan 2020 04:11:53 +0000 (20:11 -0800)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2020 04:11:53 +0000 (20:11 -0800)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 2e43b64c94e49f7133b9c26e84c9519935c49063)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Lib/idlelib/NEWS.txt
Lib/idlelib/configdialog.py
Lib/idlelib/idle_test/test_configdialog.py
Misc/NEWS.d/next/IDLE/2020-01-22-22-28-06.bpo-39050.zkn0FO.rst [new file with mode: 0644]

index 817bb2e0261c2aad0d045316a03e2ec0504aef4d..379e8c102d948b29dd11d2bec6bb300d165d111a 100644 (file)
@@ -3,6 +3,8 @@ Released on 2019-12-16?
 ======================================
 
 
+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.
 
index aaf319bbe1befd0fa0fa71e1eff134e79561814c..0e007b516ea5e14086766352636f58a12f4fffdc 100644 (file)
@@ -210,7 +210,7 @@ class ConfigDialog(Toplevel):
         """
         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.
index 1f14ed1f26473004c26c6bf74996c4caf3762a03..7c575d0e5992c2c93e4673db99a61d2a9d17152b 100644 (file)
@@ -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.
diff --git a/Misc/NEWS.d/next/IDLE/2020-01-22-22-28-06.bpo-39050.zkn0FO.rst b/Misc/NEWS.d/next/IDLE/2020-01-22-22-28-06.bpo-39050.zkn0FO.rst
new file mode 100644 (file)
index 0000000..e71265c
--- /dev/null
@@ -0,0 +1 @@
+Make IDLE Settings dialog Help button work again.