[Python-checkins] r74422 - in python/branches/tk_and_idle_maintenance/Lib/idlelib: PyShell.py WindowList.py
guilherme.polo
python-checkins at python.org
Thu Aug 13 19:20:10 CEST 2009
Author: guilherme.polo
Date: Thu Aug 13 19:20:04 2009
New Revision: 74422
Log:
Allow wakeup to always bring the window forward.
Modified:
python/branches/tk_and_idle_maintenance/Lib/idlelib/PyShell.py
python/branches/tk_and_idle_maintenance/Lib/idlelib/WindowList.py
Modified: python/branches/tk_and_idle_maintenance/Lib/idlelib/PyShell.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/idlelib/PyShell.py (original)
+++ python/branches/tk_and_idle_maintenance/Lib/idlelib/PyShell.py Thu Aug 13 19:20:04 2009
@@ -1287,7 +1287,7 @@
def write(self, s):
if not self.signaled:
- self.shell.top.wakeup()
+ self.shell.top.wakeup(anystate=True)
self.signaled = True
PseudoFile.write(self, s)
Modified: python/branches/tk_and_idle_maintenance/Lib/idlelib/WindowList.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/idlelib/WindowList.py (original)
+++ python/branches/tk_and_idle_maintenance/Lib/idlelib/WindowList.py Thu Aug 13 19:20:04 2009
@@ -77,9 +77,13 @@
# Subclass can override
return self.wm_title()
- def wakeup(self):
+ def wakeup(self, anystate=False):
+ """Signal the user about something important.
+
+ If anystate is true the window will always come forward, otherwise,
+ this will only happen if the window has been minimized."""
try:
- if self.wm_state() == "iconic":
+ if anystate or self.wm_state() == "iconic":
self.wm_withdraw()
self.wm_deiconify()
self.tkraise()
More information about the Python-checkins
mailing list