[Python-3000-checkins] r67436 - in python/branches/py3k: Lib/idlelib/WindowList.py Misc/NEWS

amaury.forgeotdarc python-3000-checkins at python.org
Sat Nov 29 00:28:42 CET 2008


Author: amaury.forgeotdarc
Date: Sat Nov 29 00:28:42 2008
New Revision: 67436

Log:
#4455: IDLE failed to display the windows list when two windows have the same title.

Windows objects cannot be compared, and it's better to have a consistent order;
so We add the window unique ID to the sort key.

Reviewed by Benjamin Peterson.


Modified:
   python/branches/py3k/Lib/idlelib/WindowList.py
   python/branches/py3k/Misc/NEWS

Modified: python/branches/py3k/Lib/idlelib/WindowList.py
==============================================================================
--- python/branches/py3k/Lib/idlelib/WindowList.py	(original)
+++ python/branches/py3k/Lib/idlelib/WindowList.py	Sat Nov 29 00:28:42 2008
@@ -26,9 +26,9 @@
                 title = window.get_title()
             except TclError:
                 continue
-            list.append((title, window))
+            list.append((title, key, window))
         list.sort()
-        for title, window in list:
+        for title, key, window in list:
             menu.add_command(label=title, command=window.wakeup)
 
     def register_callback(self, callback):

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Sat Nov 29 00:28:42 2008
@@ -24,6 +24,9 @@
 Library
 -------
 
+- Issue #4455: IDLE failed to display the windows list when two windows have
+  the same title.
+
 - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
   exception.
 


More information about the Python-3000-checkins mailing list