Change to <<open-module>>: always pop up the dialog, using the current

selection as the default value.  This is easier to use habitually.
This commit is contained in:
Guido van Rossum 2003-06-05 11:36:55 +00:00
parent 3f8ace9a0f
commit 852f35bbeb
1 changed files with 7 additions and 8 deletions

View File

@ -411,15 +411,14 @@ class EditorWindow:
name = ""
else:
name = name.strip()
name = tkSimpleDialog.askstring("Module",
"Enter the name of a Python module\n"
"to search on sys.path and open:",
parent=self.text, initialvalue=name)
if name:
name = name.strip()
if not name:
name = tkSimpleDialog.askstring("Module",
"Enter the name of a Python module\n"
"to search on sys.path and open:",
parent=self.text)
if name:
name = name.strip()
if not name:
return
return
# XXX Ought to insert current file's directory in front of path
try:
(f, file, (suffix, mode, type)) = _find_module(name)