mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-112936: Fix IDLE: no Shell menu item in single-process mode (GH-126598)
This commit is contained in:
parent
a512905e15
commit
7e7e49be78
2 changed files with 9 additions and 4 deletions
|
@ -877,7 +877,6 @@ class PyShell(OutputWindow):
|
||||||
from idlelib.sidebar import ShellSidebar
|
from idlelib.sidebar import ShellSidebar
|
||||||
|
|
||||||
def __init__(self, flist=None):
|
def __init__(self, flist=None):
|
||||||
if use_subprocess:
|
|
||||||
ms = self.menu_specs
|
ms = self.menu_specs
|
||||||
if ms[2][0] != "shell":
|
if ms[2][0] != "shell":
|
||||||
ms.insert(2, ("shell", "She_ll"))
|
ms.insert(2, ("shell", "She_ll"))
|
||||||
|
@ -954,6 +953,11 @@ class PyShell(OutputWindow):
|
||||||
self.text.insert = self.per.top.insert
|
self.text.insert = self.per.top.insert
|
||||||
self.per.insertfilter(UserInputTaggingDelegator())
|
self.per.insertfilter(UserInputTaggingDelegator())
|
||||||
|
|
||||||
|
if not use_subprocess:
|
||||||
|
# Menu options "View Last Restart" and "Restart Shell" are disabled
|
||||||
|
self.update_menu_state("shell", 0, "disabled")
|
||||||
|
self.update_menu_state("shell", 1, "disabled")
|
||||||
|
|
||||||
def ResetFont(self):
|
def ResetFont(self):
|
||||||
super().ResetFont()
|
super().ResetFont()
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
fix IDLE: no Shell menu item in single-process mode.
|
Loading…
Add table
Add a link
Reference in a new issue