diff --git a/Source/GSServicesManager.m b/Source/GSServicesManager.m index dafc055e3..a17385268 100644 --- a/Source/GSServicesManager.m +++ b/Source/GSServicesManager.m @@ -192,7 +192,7 @@ NSRegisterServicesProvider(id provider, NSString *name) if (servicesProvider != anObject) { - appName = [[[NSProcessInfo processInfo] processName] lastPathComponent]; + appName = [[NSProcessInfo processInfo] processName]; NSRegisterServicesProvider(anObject, appName); } } @@ -391,7 +391,7 @@ static NSString *disabledName = @".GNUstepDisabled"; { NSString *appName; - appName = [[[NSProcessInfo processInfo] processName] lastPathComponent]; + appName = [[NSProcessInfo processInfo] processName]; [timer invalidate]; NSUnregisterServicesProvider(appName); [languages release]; @@ -825,7 +825,7 @@ static NSString *disabledName = @".GNUstepDisabled"; NSString *appName; BOOL registered; - appName = [[[NSProcessInfo processInfo] processName] lastPathComponent]; + appName = [[NSProcessInfo processInfo] processName]; NS_DURING { NSRegisterServicesProvider(self, appName); diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 1aa0f2468..b2dc764c4 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -211,27 +211,16 @@ NSApplication *NSApp = nil; * Now check to see if we were launched with arguments asking to * open a file. We permit some variations on the default name. */ - filePath = [defs stringForKey: @"-GSFilePath"]; - if (filePath == nil) - filePath = [defs stringForKey: @"--GSFilePath"]; - if (filePath == nil) - filePath = [defs stringForKey: @"GSFilePath"]; - if (filePath != nil) + if ((filePath = [defs stringForKey: @"GSFilePath"]) != nil) { if ([delegate respondsToSelector: @selector(application:openFile:)]) { [delegate application: self openFile: filePath]; } } - else + else if ((filePath = [defs stringForKey: @"GSTempPath"]) != nil) { - filePath = [defs stringForKey: @"-GSTempPath"]; - if (filePath == nil) - filePath = [defs stringForKey: @"--GSTempPath"]; - if (filePath == nil) - filePath = [defs stringForKey: @"GSTempPath"]; - if (filePath != nil - && [delegate respondsToSelector: @selector(application:openTempFile:)]) + if ([delegate respondsToSelector: @selector(application:openTempFile:)]) { [delegate application: self openTempFile: filePath]; } @@ -1114,8 +1103,7 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException); ASSIGN(main_menu, aMenu); - [main_menu setTitle: - [[[NSProcessInfo processInfo] processName] lastPathComponent]]; + [main_menu setTitle: [[NSProcessInfo processInfo] processName]]; [main_menu sizeToFit]; /* * Find a menucell with the title Windows this is the default windows menu