Kaydet (Commit) 7f7d5bf4 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Patch 543222. Disable script bindings in shell window.

üst f79f2f94
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment