[Idle-dev] CVS: idle EditorWindow.py,1.48,1.49

Guido van Rossum gvanrossum@users.sourceforge.net
Thu, 05 Jun 2003 04:36:59 -0700


Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv23744

Modified Files:
	EditorWindow.py 
Log Message:
Change to <<open-module>>: always pop up the dialog, using the current
selection as the default value.  This is easier to use habitually.


Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/idlefork/idle/EditorWindow.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -r1.48 -r1.49
*** EditorWindow.py	5 Jun 2003 02:34:04 -0000	1.48
--- EditorWindow.py	5 Jun 2003 11:36:55 -0000	1.49
***************
*** 412,424 ****
          else:
              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
          # XXX Ought to insert current file's directory in front of path
          try:
--- 412,423 ----
          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:
!             return
          # XXX Ought to insert current file's directory in front of path
          try: