summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-11-28 23:28:42 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-11-28 23:28:42 (GMT)
commit47c2b607b8584a5c9e4bd46f53f12fa4fb772d5e (patch)
treead82cd774bcfebd73ddb24053a2a2263234d368b /Lib
parent5cff9312fd95469f5e5afdaaa8d7949361ffc79f (diff)
downloadcpython-47c2b607b8584a5c9e4bd46f53f12fa4fb772d5e.zip
cpython-47c2b607b8584a5c9e4bd46f53f12fa4fb772d5e.tar.gz
cpython-47c2b607b8584a5c9e4bd46f53f12fa4fb772d5e.tar.bz2
#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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/WindowList.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/idlelib/WindowList.py b/Lib/idlelib/WindowList.py
index 761e015..bc74348 100644
--- a/Lib/idlelib/WindowList.py
+++ b/Lib/idlelib/WindowList.py
@@ -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):