ChangesBrowser.st
changeset 27 3dd66037a853
parent 26 ca2f2ebb8ed8
child 28 eea5a71a1e23
--- a/ChangesBrowser.st	Mon Jan 17 12:05:22 1994 +0100
+++ b/ChangesBrowser.st	Mon Jan 17 14:47:58 1994 +0100
@@ -28,7 +28,7 @@
 
 this class implements a changes browser.
 
-$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.9 1994-01-17 11:05:22 claus Exp $
+$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.10 1994-01-17 13:47:53 claus Exp $
 written jan 90 by claus
 '!
 
@@ -79,6 +79,7 @@
     codeView := v scrolledView.
 
     anyChanges := false.
+    ObjectMemory addDependent:self.
 !
 
 initializeMiddleButtonMenu
@@ -137,8 +138,32 @@
 !
 
 destroy
+    ObjectMemory removeDependent:self.
     closeBox notNil ifTrue:[closeBox destroy. closeBox := nil].
     super destroy
+!
+
+update:what
+    (what == #aboutToExit) ifTrue:[
+        "smalltalk wants to shut down this view
+         - if change list was modified, ask user and save if requested."
+
+        anyChanges ifTrue:[
+            shown ifFalse:[
+                self unrealize.
+                self realize
+            ].
+            self raise.
+            closeBox isNil ifTrue:[closeBox := YesNoBox new].
+            closeBox title:(resources at:'ChangesBrowser:\changefile has not been updated from the modified changelist.\\Update before exiting ?') withCRs.
+            closeBox noText:(resources at:'don''t update').
+            closeBox okText:(resources at:'update').
+            closeBox yesAction:[self writeBackChanges] noAction:nil.
+            closeBox showAtPointer
+        ].
+	^ self
+    ].
+    super update:what
 ! !
 
 !ChangesBrowser methodsFor:'private'!
@@ -780,25 +805,6 @@
     self destroy
 !
 
-saveTerminate
-    "smalltalk wants to shut down this view 
-     - if change list was modified, ask user and save if requested."
-
-    anyChanges ifTrue:[
-	shown ifFalse:[
-	    self unrealize.
-	    self realize
-	].
-	self raise.
-        closeBox isNil ifTrue:[closeBox := YesNoBox new].
-        closeBox title:(resources at:'ChangesBrowser:\changefile has not been updated from the modified changelist.\\Update before exiting ?') withCRs.
-	closeBox noText:(resources at:'don''t update').
-	closeBox okText:(resources at:'update').
-        closeBox yesAction:[self writeBackChanges] noAction:nil.
-        closeBox showAtPointer
-    ]
-!
-
 terminate
     "window manager wants us to go away"