mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Patch 543222. Disable script bindings in shell window.
This commit is contained in:
parent
f79f2f94d5
commit
7f7d5bf438
3 changed files with 5 additions and 0 deletions
|
@ -95,6 +95,7 @@ class EditorWindow:
|
|||
about_text = about_text
|
||||
|
||||
vars = {}
|
||||
runnable = False # Shell window cannot Import Module or Run Script
|
||||
|
||||
def __init__(self, flist=None, filename=None, key=None, root=None):
|
||||
edconf = idleconf.getsection('EditorWindow')
|
||||
|
|
|
@ -76,6 +76,7 @@ class PyShellEditorWindow(EditorWindow):
|
|||
|
||||
# Regular text edit window when a shell is present
|
||||
# XXX ought to merge with regular editor window
|
||||
runnable = True # Shell not present, enable Import Module and Run Script
|
||||
|
||||
def __init__(self, *args):
|
||||
apply(EditorWindow.__init__, (self,) + args)
|
||||
|
|
|
@ -51,6 +51,9 @@ class ScriptBinding:
|
|||
]
|
||||
|
||||
def __init__(self, editwin):
|
||||
if not editwin.runnable:
|
||||
self.menudefs = []
|
||||
self.keydefs = {}
|
||||
self.editwin = editwin
|
||||
# Provide instance variables referenced by Debugger
|
||||
# XXX This should be done differently
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue