Minor tidyup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5256 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-11-22 16:46:37 +00:00
parent 6561a2fbfb
commit 34dec557da
3 changed files with 24 additions and 12 deletions

View file

@ -378,6 +378,8 @@ static NSCell* tileCell = nil;
- (id) init
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
if (NSApp != nil && NSApp != self)
{
RELEASE(self);
@ -410,6 +412,19 @@ static NSCell* tileCell = nil;
/* We are the end of responder chain */
[self setNextResponder: nil];
/* Register self as observer to window events. */
[nc addObserver: self selector: @selector(_windowWillClose:)
name: NSWindowWillCloseNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidBecomeKey:)
name: NSWindowDidBecomeKeyNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidBecomeMain:)
name: NSWindowDidBecomeMainNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidResignKey:)
name: NSWindowDidResignKeyNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidResignMain:)
name: NSWindowDidResignMainNotification object: nil];
return self;
}
@ -452,18 +467,6 @@ static NSCell* tileCell = nil;
[self activateIgnoringOtherApps: YES];
/* Register self as observer to window events. */
[nc addObserver: self selector: @selector(_windowWillClose:)
name: NSWindowWillCloseNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidBecomeKey:)
name: NSWindowDidBecomeKeyNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidBecomeMain:)
name: NSWindowDidBecomeMainNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidResignKey:)
name: NSWindowDidResignKeyNotification object: nil];
[nc addObserver: self selector: @selector(_windowDidResignMain:)
name: NSWindowDidResignMainNotification object: nil];
/* finish the launching post notification that launching has finished */
[nc postNotificationName: NSApplicationDidFinishLaunchingNotification
object: self];