Skip to content
4 changes: 2 additions & 2 deletions Lib/idlelib/autocomplete_w.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def winconfig_event(self, event):
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)
Expand All @@ -269,7 +269,7 @@ def hide_event(self, event):
# 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)
Expand Down
6 changes: 3 additions & 3 deletions Lib/idlelib/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
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:
Expand Down Expand Up @@ -410,7 +410,7 @@ def set_line_and_column(self, event=None):
("format", "F_ormat"),
("run", "_Run"),
("options", "_Options"),
("windows", "_Window"),
("window", "_Window"),
("help", "_Help"),
]

Expand All @@ -437,7 +437,7 @@ def createmenubar(self):

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
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_mainmenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/macosx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/mainmenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
('_Code Context', '<<toggle-code-context>>'),
]),

('windows', [
('window', [
('Zoom Height', '<<zoom-height>>'),
]),

Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ class PyShell(OutputWindow):
("edit", "_Edit"),
("debug", "_Debug"),
("options", "_Options"),
("windows", "_Window"),
("window", "_Window"),
("help", "_Help"),
]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Change mainmenu.menudefs key 'windows' to 'window'. Every other menudef key
is lowercase version of main menu entry.