Commit 47c2b607 authored by Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

#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.
parent 5cff9312
...@@ -26,9 +26,9 @@ class WindowList: ...@@ -26,9 +26,9 @@ class WindowList:
title = window.get_title() title = window.get_title()
except TclError: except TclError:
continue continue
list.append((title, window)) list.append((title, key, window))
list.sort() list.sort()
for title, window in list: for title, key, window in list:
menu.add_command(label=title, command=window.wakeup) menu.add_command(label=title, command=window.wakeup)
def register_callback(self, callback): def register_callback(self, callback):
......
...@@ -24,6 +24,9 @@ Core and Builtins ...@@ -24,6 +24,9 @@ Core and Builtins
Library 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 - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
exception. exception.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment