#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.
This commit is contained in:
Amaury Forgeot d'Arc 2008-11-28 23:28:42 +00:00
parent 5cff9312fd
commit 47c2b607b8
2 changed files with 5 additions and 2 deletions

View file

@ -26,9 +26,9 @@ class WindowList:
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):