Noam Raphel: Further developemt of CodeContext feature.

The visibility state of the code context pane is now persistent between
sessions and the pane does not appear in the shell window.

M CodeContext.py
M EditorWindow.py
M NEWS.txt
M PyShell.py
M config-extensions.def
M configHandler.py
This commit is contained in:
Kurt B. Kaiser 2004-06-06 01:29:22 +00:00
parent cfa157d808
commit 4d5bc6031c
6 changed files with 86 additions and 48 deletions

View file

@ -751,14 +751,16 @@ class EditorWindow:
traceback.print_exc()
def get_standard_extension_names(self):
return idleConf.GetExtensions()
return idleConf.GetExtensions(editor_only=True)
def load_extension(self, name):
mod = __import__(name, globals(), locals(), [])
cls = getattr(mod, name)
keydefs = idleConf.GetExtensionBindings(name)
if hasattr(cls, "menudefs"):
self.fill_menus(cls.menudefs, keydefs)
ins = cls(self)
self.extensions[name] = ins
keydefs=idleConf.GetExtensionBindings(name)
if keydefs:
self.apply_bindings(keydefs)
for vevent in keydefs.keys():
@ -770,8 +772,6 @@ class EditorWindow:
methodname = methodname + "_event"
if hasattr(ins, methodname):
self.text.bind(vevent, getattr(ins, methodname))
if hasattr(ins, "menudefs"):
self.fill_menus(ins.menudefs, keydefs)
return ins
def apply_bindings(self, keydefs=None):