mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 14:41:56 +00:00
2005-01-18 15:46 Alexander Malmberg <alexander@malmberg.org>
* Source/NSApplication.m (-finishLaunching): Don't attempt to open an untitled file if we were autolaunched. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20577 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
45e9460fd6
commit
3a6de05e8b
2 changed files with 23 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-01-18 15:46 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
|
* Source/NSApplication.m (-finishLaunching): Don't attempt to open
|
||||||
|
an untitled file if we were autolaunched.
|
||||||
|
|
||||||
2005-01-18 14:16 Alexander Malmberg <alexander@malmberg.org>
|
2005-01-18 14:16 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Source/NSAffineTransform.m (pi): Correct the rounding.
|
* Source/NSAffineTransform.m (pi): Correct the rounding.
|
||||||
|
|
|
@ -686,7 +686,7 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
GSDisplayServer *srv;
|
GSDisplayServer *srv;
|
||||||
/* Initialization must be enclosed in an autorelease pool. */
|
/* Initialization must be enclosed in an autorelease pool. */
|
||||||
CREATE_AUTORELEASE_POOL (_app_init_pool);
|
CREATE_AUTORELEASE_POOL (_app_init_pool);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set NSApp as soon as possible, since other gui classes (which
|
* Set NSApp as soon as possible, since other gui classes (which
|
||||||
* we refer or use in this method) might be calling [NSApplication
|
* we refer or use in this method) might be calling [NSApplication
|
||||||
|
@ -694,26 +694,26 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
* those calls to succeed.
|
* those calls to succeed.
|
||||||
*/
|
*/
|
||||||
NSApp = self;
|
NSApp = self;
|
||||||
|
|
||||||
/* Initialize the backend here. */
|
/* Initialize the backend here. */
|
||||||
initialize_gnustep_backend();
|
initialize_gnustep_backend();
|
||||||
|
|
||||||
/* Load user-defined bundles */
|
/* Load user-defined bundles */
|
||||||
gsapp_user_bundles();
|
gsapp_user_bundles();
|
||||||
|
|
||||||
/* Connect to our window server. */
|
/* Connect to our window server. */
|
||||||
srv = [GSDisplayServer serverWithAttributes: nil];
|
srv = [GSDisplayServer serverWithAttributes: nil];
|
||||||
RETAIN(srv);
|
RETAIN(srv);
|
||||||
[GSDisplayServer setCurrentServer: srv];
|
[GSDisplayServer setCurrentServer: srv];
|
||||||
|
|
||||||
/* Create a default context. */
|
/* Create a default context. */
|
||||||
_default_context = [NSGraphicsContext graphicsContextWithAttributes: nil];
|
_default_context = [NSGraphicsContext graphicsContextWithAttributes: nil];
|
||||||
RETAIN(_default_context);
|
RETAIN(_default_context);
|
||||||
[NSGraphicsContext setCurrentContext: _default_context];
|
[NSGraphicsContext setCurrentContext: _default_context];
|
||||||
|
|
||||||
/* Initialize font manager. */
|
/* Initialize font manager. */
|
||||||
[NSFontManager sharedFontManager];
|
[NSFontManager sharedFontManager];
|
||||||
|
|
||||||
_hidden = [[NSMutableArray alloc] init];
|
_hidden = [[NSMutableArray alloc] init];
|
||||||
_inactive = [[NSMutableArray alloc] init];
|
_inactive = [[NSMutableArray alloc] init];
|
||||||
_unhide_on_activation = YES;
|
_unhide_on_activation = YES;
|
||||||
|
@ -723,19 +723,19 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
//_app_is_active = NO;
|
//_app_is_active = NO;
|
||||||
//_main_menu = nil;
|
//_main_menu = nil;
|
||||||
_windows_need_update = YES;
|
_windows_need_update = YES;
|
||||||
|
|
||||||
/* Set a new exception handler for the gui library. */
|
/* Set a new exception handler for the gui library. */
|
||||||
NSSetUncaughtExceptionHandler (_NSAppKitUncaughtExceptionHandler);
|
NSSetUncaughtExceptionHandler (_NSAppKitUncaughtExceptionHandler);
|
||||||
|
|
||||||
_listener = [GSServicesManager newWithApplication: self];
|
_listener = [GSServicesManager newWithApplication: self];
|
||||||
|
|
||||||
/* NSEvent doesn't use -init so we use +alloc instead of +new. */
|
/* NSEvent doesn't use -init so we use +alloc instead of +new. */
|
||||||
_current_event = [NSEvent alloc]; // no current event
|
_current_event = [NSEvent alloc]; // no current event
|
||||||
null_event = [NSEvent alloc]; // create dummy event
|
null_event = [NSEvent alloc]; // create dummy event
|
||||||
|
|
||||||
/* We are the end of responder chain. */
|
/* We are the end of responder chain. */
|
||||||
[self setNextResponder: nil];
|
[self setNextResponder: nil];
|
||||||
|
|
||||||
RELEASE (_app_init_pool);
|
RELEASE (_app_init_pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -926,10 +926,12 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
[_listener application: self printFile: filePath];
|
[_listener application: self printFile: filePath];
|
||||||
[self terminate: self];
|
[self terminate: self];
|
||||||
}
|
}
|
||||||
else if ([_delegate respondsToSelector:
|
else if (![defs boolForKey: @"autolaunch"]
|
||||||
@selector(applicationShouldOpenUntitledFile:)]
|
&& [_delegate respondsToSelector:
|
||||||
&& ([_delegate applicationShouldOpenUntitledFile: self] == YES)
|
@selector(applicationShouldOpenUntitledFile:)]
|
||||||
&& [_delegate respondsToSelector: @selector(applicationOpenUntitledFile:)])
|
&& ([_delegate applicationShouldOpenUntitledFile: self])
|
||||||
|
&& [_delegate respondsToSelector:
|
||||||
|
@selector(applicationOpenUntitledFile:)])
|
||||||
{
|
{
|
||||||
[_delegate applicationOpenUntitledFile: self];
|
[_delegate applicationOpenUntitledFile: self];
|
||||||
}
|
}
|
||||||
|
@ -1559,7 +1561,7 @@ See -runModalForWindow:
|
||||||
- (void) sendEvent: (NSEvent *)theEvent
|
- (void) sendEvent: (NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
NSEventType type;
|
NSEventType type;
|
||||||
|
|
||||||
type = [theEvent type];
|
type = [theEvent type];
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue