#terminate -> #closeRequest
authorClaus Gittinger <cg@exept.de>
Mon, 03 Aug 1998 19:57:49 +0200
changeset 1787 d3d0266b35ec
parent 1786 b209a26b4143
child 1788 4f2616466d68
#terminate -> #closeRequest
CBrowser.st
ChangesBrowser.st
--- a/CBrowser.st	Mon Aug 03 19:56:47 1998 +0200
+++ b/CBrowser.st	Mon Aug 03 19:57:49 1998 +0200
@@ -2038,6 +2038,35 @@
 
 !ChangesBrowser methodsFor:'termination'!
 
+closeRequest
+    "window manager wants us to go away"
+
+    |action again|
+
+    anyChanges ifTrue:[
+        again := true.
+        [again] whileTrue:[
+            action := OptionBox 
+                              request:(resources at:'changefile has not been updated from the modified changelist.\\Update before closing ?') withCRs
+                              label:'ChangesBrowser'
+                              form:(WarningBox iconBitmap)
+                              buttonLabels:(resources array:#('cancel' 'don''t update' 'update'))
+                              values:#(#abort #ignore #save)
+                              default:#save.
+
+            again := false.
+            action == #abort ifTrue:[^ self].
+            action  == #save ifTrue:[
+                again := self writeBackChanges not
+            ].
+        ]
+    ].
+    super closeRequest
+
+    "Modified: / 31.7.1997 / 18:29:06 / cg"
+    "Created: / 3.8.1998 / 19:54:13 / cg"
+!
+
 destroy
     "destroy the receiver; make certain, that boxes are destroyed too"
 
@@ -2052,37 +2081,11 @@
      send it; instead, they simply destroy the view."
 
     anyChanges ifTrue:[
-	self writeBackChanges.
+        self writeBackChanges.
     ].
-    self destroy
-!
-
-terminate
-    "window manager wants us to go away"
-
-    |action again|
-
-    anyChanges ifTrue:[
-	again := true.
-	[again] whileTrue:[
-	    action := OptionBox 
-			      request:(resources at:'changefile has not been updated from the modified changelist.\\Update before closing ?') withCRs
-			      label:'ChangesBrowser'
-			      form:(WarningBox iconBitmap)
-			      buttonLabels:(resources array:#('cancel' 'don''t update' 'update'))
-			      values:#(#abort #ignore #save)
-			      default:#save.
-
-	    again := false.
-	    action == #abort ifTrue:[^ self].
-	    action  == #save ifTrue:[
-		again := self writeBackChanges not
-	    ].
-	]
-    ].
-    self destroy
-
-    "Modified: 31.7.1997 / 18:29:06 / cg"
+    super saveAndTerminate
+
+    "Modified: / 3.8.1998 / 19:54:00 / cg"
 ! !
 
 !ChangesBrowser methodsFor:'user interaction'!
@@ -2861,5 +2864,5 @@
 !ChangesBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/CBrowser.st,v 1.142 1998-07-31 18:18:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/CBrowser.st,v 1.143 1998-08-03 17:57:49 cg Exp $'
 ! !
--- a/ChangesBrowser.st	Mon Aug 03 19:56:47 1998 +0200
+++ b/ChangesBrowser.st	Mon Aug 03 19:57:49 1998 +0200
@@ -2038,6 +2038,35 @@
 
 !ChangesBrowser methodsFor:'termination'!
 
+closeRequest
+    "window manager wants us to go away"
+
+    |action again|
+
+    anyChanges ifTrue:[
+        again := true.
+        [again] whileTrue:[
+            action := OptionBox 
+                              request:(resources at:'changefile has not been updated from the modified changelist.\\Update before closing ?') withCRs
+                              label:'ChangesBrowser'
+                              form:(WarningBox iconBitmap)
+                              buttonLabels:(resources array:#('cancel' 'don''t update' 'update'))
+                              values:#(#abort #ignore #save)
+                              default:#save.
+
+            again := false.
+            action == #abort ifTrue:[^ self].
+            action  == #save ifTrue:[
+                again := self writeBackChanges not
+            ].
+        ]
+    ].
+    super closeRequest
+
+    "Modified: / 31.7.1997 / 18:29:06 / cg"
+    "Created: / 3.8.1998 / 19:54:13 / cg"
+!
+
 destroy
     "destroy the receiver; make certain, that boxes are destroyed too"
 
@@ -2052,37 +2081,11 @@
      send it; instead, they simply destroy the view."
 
     anyChanges ifTrue:[
-	self writeBackChanges.
+        self writeBackChanges.
     ].
-    self destroy
-!
-
-terminate
-    "window manager wants us to go away"
-
-    |action again|
-
-    anyChanges ifTrue:[
-	again := true.
-	[again] whileTrue:[
-	    action := OptionBox 
-			      request:(resources at:'changefile has not been updated from the modified changelist.\\Update before closing ?') withCRs
-			      label:'ChangesBrowser'
-			      form:(WarningBox iconBitmap)
-			      buttonLabels:(resources array:#('cancel' 'don''t update' 'update'))
-			      values:#(#abort #ignore #save)
-			      default:#save.
-
-	    again := false.
-	    action == #abort ifTrue:[^ self].
-	    action  == #save ifTrue:[
-		again := self writeBackChanges not
-	    ].
-	]
-    ].
-    self destroy
-
-    "Modified: 31.7.1997 / 18:29:06 / cg"
+    super saveAndTerminate
+
+    "Modified: / 3.8.1998 / 19:54:00 / cg"
 ! !
 
 !ChangesBrowser methodsFor:'user interaction'!
@@ -2861,5 +2864,5 @@
 !ChangesBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.142 1998-07-31 18:18:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.143 1998-08-03 17:57:49 cg Exp $'
 ! !