]> granicus.if.org Git - python/commitdiff
bpo-33924: Change IDLE mainmenu.menudefs key 'windows' to 'window' (GH-7836)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 21 Jun 2018 04:40:57 +0000 (21:40 -0700)
committerGitHub <noreply@github.com>
Thu, 21 Jun 2018 04:40:57 +0000 (21:40 -0700)
Every other menudef key is the lowercase version of the
corresponding main menu entry (in this case, 'Window').
(cherry picked from commit 33c7420e7dd9d8e5b2aa15e98da6291bab6fcf33)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/idlelib/autocomplete_w.py
Lib/idlelib/editor.py
Lib/idlelib/idle_test/test_mainmenu.py
Lib/idlelib/macosx.py
Lib/idlelib/mainmenu.py
Lib/idlelib/pyshell.py
Misc/NEWS.d/next/IDLE/2018-06-20-22-14-07.bpo-33924.6Rz1wt.rst [new file with mode: 0644]

index 66211d4554a24699315cb1611368d180ce3644bd..9e0d336523d4799fe53450fabd69288e40b4edb6 100644 (file)
@@ -246,7 +246,7 @@ class AutoCompleteWindow:
         acw.wm_geometry("+%d+%d" % (new_x, new_y))
 
         if platform.system().startswith('Windows'):
-            # See issue 15786. When on windows platform, Tk will misbehave
+            # See issue 15786. When on Windows platform, Tk will misbehave
             # to call winconfig_event multiple times, we need to prevent this,
             # otherwise mouse button double click will not be able to used.
             acw.unbind(WINCONFIG_SEQUENCE, self.winconfigid)
@@ -269,7 +269,7 @@ class AutoCompleteWindow:
         # mouse click on widget / text area.
         if self.is_active():
             if event.type == EventType.FocusOut:
-                # On windows platform, it will need to delay the check for
+                # On Windows platform, it will need to delay the check for
                 # acw.focus_get() when click on acw, otherwise it will return
                 # None and close the window
                 self.widget.after(1, self._hide_event_check)
index 3f034f8810074d7073dc7140801790c297bbd4dd..1a163891c27d457d00444ef12ce024665dbf5e6b 100644 (file)
@@ -267,7 +267,7 @@ class EditorWindow(object):
         self.saved_change_hook()
         self.update_recent_files_list()
         self.load_extensions()
-        menu = self.menudict.get('windows')
+        menu = self.menudict.get('window')
         if menu:
             end = menu.index("end")
             if end is None:
@@ -410,7 +410,7 @@ class EditorWindow(object):
         ("format", "F_ormat"),
         ("run", "_Run"),
         ("options", "_Options"),
-        ("windows", "_Window"),
+        ("window", "_Window"),
         ("help", "_Help"),
     ]
 
@@ -437,7 +437,7 @@ class EditorWindow(object):
 
     def postwindowsmenu(self):
         # Only called when Window menu exists
-        menu = self.menudict['windows']
+        menu = self.menudict['window']
         end = menu.index("end")
         if end is None:
             end = -1
index 04711284fb2f69b124e56015910700618a0f9803..7ec0368371c7dfd783f3430b453403add433a399 100644 (file)
@@ -10,7 +10,7 @@ class MainMenuTest(unittest.TestCase):
     def test_menudefs(self):
         actual = [item[0] for item in mainmenu.menudefs]
         expect = ['file', 'edit', 'format', 'run', 'shell',
-                  'debug', 'options', 'windows', 'help']
+                  'debug', 'options', 'window', 'help']
         self.assertEqual(actual, expect)
 
     def test_default_keydefs(self):
index 3d296123d58c25004e6ee908d5ccb8ada33bb5e7..a2260af6e753a38e865509b475bcf3e4ecf5046f 100644 (file)
@@ -148,7 +148,7 @@ def overrideRootMenu(root, flist):
     root.configure(menu=menubar)
     menudict = {}
 
-    menudict['windows'] = menu = Menu(menubar, name='windows', tearoff=0)
+    menudict['window'] = menu = Menu(menubar, name='window', tearoff=0)
     menubar.add_cascade(label='Window', menu=menu, underline=0)
 
     def postwindowsmenu(menu=menu):
index 04acaedb77c0b5001e86bc2bdc320d7c4d0a3b93..9fe6b5229446e3072744db46de8a3001f6adff47 100644 (file)
@@ -97,7 +97,7 @@ menudefs = [
    ('_Code Context', '<<toggle-code-context>>'),
    ]),
 
- ('windows', [
+ ('window', [
    ('Zoom Height', '<<zoom-height>>'),
    ]),
 
index 6746489eef41518048b515ac4144ab8611617e2a..52c11e30dbd50021bb477f392f567b34a1a290b0 100755 (executable)
@@ -852,7 +852,7 @@ class PyShell(OutputWindow):
         ("edit", "_Edit"),
         ("debug", "_Debug"),
         ("options", "_Options"),
-        ("windows", "_Window"),
+        ("window", "_Window"),
         ("help", "_Help"),
     ]
 
diff --git a/Misc/NEWS.d/next/IDLE/2018-06-20-22-14-07.bpo-33924.6Rz1wt.rst b/Misc/NEWS.d/next/IDLE/2018-06-20-22-14-07.bpo-33924.6Rz1wt.rst
new file mode 100644 (file)
index 0000000..03f9efd
--- /dev/null
@@ -0,0 +1,2 @@
+Change mainmenu.menudefs key 'windows' to 'window'. Every other menudef key
+is lowercase version of main menu entry.