summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/WindowList.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2004-08-22 05:14:32 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2004-08-22 05:14:32 (GMT)
commit183403a271977a26c0b77dbcf62e19395c007288 (patch)
treea999a52ca973e661ac249a934a5358a1cbb83c03 /Lib/idlelib/WindowList.py
parente594bee5351d6109ca5e6a7dde45e5ddd08ebe48 (diff)
downloadcpython-183403a271977a26c0b77dbcf62e19395c007288.zip
cpython-183403a271977a26c0b77dbcf62e19395c007288.tar.gz
cpython-183403a271977a26c0b77dbcf62e19395c007288.tar.bz2
1. If user passes a non-existant filename on the commandline, just open
a new file, don't raise a dialog. IDLEfork 954928. 2. Refactor EditorWindow.wakeup() to WindowList.ListedToplevel.wakeup() and clarify that the Toplevel of an EditorWindow is a WindowList.ListedToplevel. 3. Make a number of improvements to keyboard focus binding. Improve window raising, especially in the debugger. IDLEfork Bug 763524 (GvR list). 4. Bump idlever to 1.1a3 M Debugger.py M EditorWindow.py M FileList.py M NEWS.txt M PyShell.py M WindowList.py M idlever.py
Diffstat (limited to 'Lib/idlelib/WindowList.py')
-rw-r--r--Lib/idlelib/WindowList.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/idlelib/WindowList.py b/Lib/idlelib/WindowList.py
index ba9f3b3..658502b 100644
--- a/Lib/idlelib/WindowList.py
+++ b/Lib/idlelib/WindowList.py
@@ -60,6 +60,7 @@ class ListedToplevel(Toplevel):
def __init__(self, master, **kw):
Toplevel.__init__(self, master, kw)
registry.add(self)
+ self.focused_widget = self
def destroy(self):
registry.delete(self)
@@ -79,10 +80,10 @@ class ListedToplevel(Toplevel):
def wakeup(self):
try:
if self.wm_state() == "iconic":
+ self.wm_withdraw()
self.wm_deiconify()
- else:
- self.tkraise()
- self.focus_set()
+ self.tkraise()
+ self.focused_widget.focus_set()
except TclError:
# This can happen when the window menu was torn off.
# Simply ignore it.