]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Better quitting
authorBarry Warsaw <barry@python.org>
Tue, 6 Oct 1998 19:48:35 +0000 (19:48 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 6 Oct 1998 19:48:35 +0000 (19:48 +0000)
Tools/pynche/DetailsViewer.py
Tools/pynche/ListViewer.py
Tools/pynche/TextViewer.py

index 905bbbae4864b37a6ba0d5e4001e263e6cfb1a79..b82e0080cecd897ade959d8e3292c16d902db459 100644 (file)
@@ -52,7 +52,6 @@ Shift + Left == -25
 Shift + Right == +25
 """
 
-import sys
 from Tkinter import *
 
 STOP = 'Stop'
@@ -153,7 +152,7 @@ class DetailsViewer:
         self.__l2.configure(text=text)
 
     def __quit(self, event=None):
-        sys.exit(0)
+        self.__root.quit()
 
     def __withdraw(self, event=None):
         self.__root.withdraw()
index 2a54f8fb1dd23d4ba87756ac2c5294640edddd2a..8c8a6eec9bfb30e440d0aadfe95a5faabbe460ba 100644 (file)
@@ -15,7 +15,6 @@ You can turn off Update On Click if all you want to see is the alias for a
 given name, without selecting the color.
 """
 
-import sys
 from Tkinter import *
 import ColorDB
 
@@ -123,7 +122,7 @@ class ListViewer:
             self.__sb.update_views(self.__red, self.__green, self.__blue)
 
     def __quit(self, event=None):
-        sys.exit(0)
+        self.__root.quit()
 
     def __withdraw(self, event=None):
         self.__root.withdraw()
index 15a67dd4f274f3871928eb51db4434d2d8e3f8b4..316bd1537fca3c34d31082a3e876b6faffde48d2 100644 (file)
@@ -15,7 +15,6 @@ button and drag it through some text.  The Insertion is the insertion cursor
 in the text window (which only has a background).
 """
 
-import sys
 from Tkinter import *
 import ColorDB
 
@@ -89,7 +88,7 @@ textual displays.''')
         self.__toggletrack()
 
     def __quit(self, event=None):
-        sys.exit(0)
+        self.__root.quit()
 
     def __withdraw(self, event=None):
         self.__root.withdraw()