diff --git a/ChangeLog b/ChangeLog index ecb9902ec..e5e3046e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Sep 5 03:04:41 2000 Nicola Pero + + * Source/NSApplication.m ([-terminate:]): Post + NSApplicationWillTerminateNotification. ([-setDelegate:]): + Register the delegate for NSApplicationWillTerminateNotification. + Tue Sep 5 00:31:50 2000 Nicola Pero * Source/NSClipView.m ([-encodeWithCoder:]), ([-initWithCoder:]): diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 2e83ef641..fec31f045 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -2119,7 +2119,10 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException); if (shouldTerminate) { NSDictionary *userInfo; + NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName: NSApplicationWillTerminateNotification + object: self]; app_should_quit = YES; /* * add dummy event to queue to assure loop cycles @@ -2168,6 +2171,7 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException); SET_DELEGATE_NOTIFICATION(WillFinishLaunching); SET_DELEGATE_NOTIFICATION(WillHide); SET_DELEGATE_NOTIFICATION(WillResignActive); + SET_DELEGATE_NOTIFICATION(WillTerminate); SET_DELEGATE_NOTIFICATION(WillUnhide); SET_DELEGATE_NOTIFICATION(WillUpdate); }