mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Issue #16233: When the module browser is not invoked in an editor window with
a filename, pop up the Open Module box. If a module is opened, open a corresponding browser.
This commit is contained in:
parent
c966103be6
commit
380ec63f23
1 changed files with 6 additions and 7 deletions
|
@ -689,16 +689,15 @@ class EditorWindow(object):
|
|||
self.flist.open(file_path)
|
||||
else:
|
||||
self.io.loadfile(file_path)
|
||||
return file_path
|
||||
|
||||
def open_class_browser(self, event=None):
|
||||
filename = self.io.filename
|
||||
if not filename:
|
||||
tkMessageBox.showerror(
|
||||
"No filename",
|
||||
"This buffer has no associated filename",
|
||||
master=self.text)
|
||||
self.text.focus_set()
|
||||
return None
|
||||
if not (self.__class__.__name__ == 'PyShellEditorWindow'
|
||||
and filename):
|
||||
filename = self.open_module()
|
||||
if filename is None:
|
||||
return
|
||||
head, tail = os.path.split(filename)
|
||||
base, ext = os.path.splitext(tail)
|
||||
from idlelib import ClassBrowser
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue