Josh Robb's Patch
authorKurt B. Kaiser <kbk@shore.net>
Fri, 4 Oct 2002 21:54:41 +0000 (21:54 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Fri, 4 Oct 2002 21:54:41 +0000 (21:54 +0000)
[ 617109 ] WindowList.py: fix win98 quit.

Lib/idlelib/WindowList.py

index 7e05a57c03296ce697f73a18777aad2eb3daf0c0..542b738674f068ed48213d0baad1a5dc956188c6 100644 (file)
@@ -67,6 +67,10 @@ class ListedToplevel(Toplevel):
     def destroy(self):
         registry.delete(self)
         Toplevel.destroy(self)
+        # If this is Idle's last window then quit the mainloop
+        # (Needed for clean exit on Windows 98)
+        if not registry.dict:
+            self.quit()
 
     def get_title(self):
         # Subclass can override