Implemented NSApplicationWillTerminateNotification

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7380 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2000-09-05 01:07:59 +00:00
parent e283291b1b
commit 4886431eba
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,9 @@
Tue Sep 5 03:04:41 2000 Nicola Pero <nicola@brainstorm.co.uk>
* Source/NSApplication.m ([-terminate:]): Post
NSApplicationWillTerminateNotification. ([-setDelegate:]):
Register the delegate for NSApplicationWillTerminateNotification.
Tue Sep 5 00:31:50 2000 Nicola Pero <nicola@brainstorm.co.uk>
* Source/NSClipView.m ([-encodeWithCoder:]), ([-initWithCoder:]):

View file

@ -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);
}