mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:40:48 +00:00
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:
parent
579be687fb
commit
b57562d412
3 changed files with 24 additions and 12 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Nov 22 14:51:33:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
|
* Source/NSApplication.m: Start listening for window notifications
|
||||||
|
in initialisation.
|
||||||
|
|
||||||
1999-11-21 Tim McIntosh <rockford@novia.net>
|
1999-11-21 Tim McIntosh <rockford@novia.net>
|
||||||
|
|
||||||
* Model/GMAppKit.m ([NSMenuItem -initWithModelUnarchiver:]),
|
* Model/GMAppKit.m ([NSMenuItem -initWithModelUnarchiver:]),
|
||||||
|
|
|
@ -378,6 +378,8 @@ static NSCell* tileCell = nil;
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
|
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||||
|
|
||||||
if (NSApp != nil && NSApp != self)
|
if (NSApp != nil && NSApp != self)
|
||||||
{
|
{
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
|
@ -410,6 +412,19 @@ static NSCell* tileCell = nil;
|
||||||
|
|
||||||
/* We are the end of responder chain */
|
/* We are the end of responder chain */
|
||||||
[self setNextResponder: nil];
|
[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;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,18 +467,6 @@ static NSCell* tileCell = nil;
|
||||||
|
|
||||||
[self activateIgnoringOtherApps: YES];
|
[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 */
|
/* finish the launching post notification that launching has finished */
|
||||||
[nc postNotificationName: NSApplicationDidFinishLaunchingNotification
|
[nc postNotificationName: NSApplicationDidFinishLaunchingNotification
|
||||||
object: self];
|
object: self];
|
||||||
|
|
|
@ -673,6 +673,10 @@ static NSMapTable* windowmaps = NULL;
|
||||||
|
|
||||||
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
|
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
|
||||||
{
|
{
|
||||||
|
if (_f.is_key == YES && place == NSWindowOut)
|
||||||
|
{
|
||||||
|
[self resignKeyWindow];
|
||||||
|
}
|
||||||
DPSorderwindow(GSCurrentContext(), place, otherWin, [self windowNumber]);
|
DPSorderwindow(GSCurrentContext(), place, otherWin, [self windowNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue