mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 02:41:01 +00:00
Fixed [NSProcessInfo -processName] and updated places that used it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4809 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
989462d2f7
commit
95d6f663cf
2 changed files with 7 additions and 19 deletions
|
@ -192,7 +192,7 @@ NSRegisterServicesProvider(id provider, NSString *name)
|
||||||
|
|
||||||
if (servicesProvider != anObject)
|
if (servicesProvider != anObject)
|
||||||
{
|
{
|
||||||
appName = [[[NSProcessInfo processInfo] processName] lastPathComponent];
|
appName = [[NSProcessInfo processInfo] processName];
|
||||||
NSRegisterServicesProvider(anObject, appName);
|
NSRegisterServicesProvider(anObject, appName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -391,7 +391,7 @@ static NSString *disabledName = @".GNUstepDisabled";
|
||||||
{
|
{
|
||||||
NSString *appName;
|
NSString *appName;
|
||||||
|
|
||||||
appName = [[[NSProcessInfo processInfo] processName] lastPathComponent];
|
appName = [[NSProcessInfo processInfo] processName];
|
||||||
[timer invalidate];
|
[timer invalidate];
|
||||||
NSUnregisterServicesProvider(appName);
|
NSUnregisterServicesProvider(appName);
|
||||||
[languages release];
|
[languages release];
|
||||||
|
@ -825,7 +825,7 @@ static NSString *disabledName = @".GNUstepDisabled";
|
||||||
NSString *appName;
|
NSString *appName;
|
||||||
BOOL registered;
|
BOOL registered;
|
||||||
|
|
||||||
appName = [[[NSProcessInfo processInfo] processName] lastPathComponent];
|
appName = [[NSProcessInfo processInfo] processName];
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
NSRegisterServicesProvider(self, appName);
|
NSRegisterServicesProvider(self, appName);
|
||||||
|
|
|
@ -211,27 +211,16 @@ NSApplication *NSApp = nil;
|
||||||
* Now check to see if we were launched with arguments asking to
|
* Now check to see if we were launched with arguments asking to
|
||||||
* open a file. We permit some variations on the default name.
|
* open a file. We permit some variations on the default name.
|
||||||
*/
|
*/
|
||||||
filePath = [defs stringForKey: @"-GSFilePath"];
|
if ((filePath = [defs stringForKey: @"GSFilePath"]) != nil)
|
||||||
if (filePath == nil)
|
|
||||||
filePath = [defs stringForKey: @"--GSFilePath"];
|
|
||||||
if (filePath == nil)
|
|
||||||
filePath = [defs stringForKey: @"GSFilePath"];
|
|
||||||
if (filePath != nil)
|
|
||||||
{
|
{
|
||||||
if ([delegate respondsToSelector: @selector(application:openFile:)])
|
if ([delegate respondsToSelector: @selector(application:openFile:)])
|
||||||
{
|
{
|
||||||
[delegate application: self openFile: filePath];
|
[delegate application: self openFile: filePath];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if ((filePath = [defs stringForKey: @"GSTempPath"]) != nil)
|
||||||
{
|
{
|
||||||
filePath = [defs stringForKey: @"-GSTempPath"];
|
if ([delegate respondsToSelector: @selector(application:openTempFile:)])
|
||||||
if (filePath == nil)
|
|
||||||
filePath = [defs stringForKey: @"--GSTempPath"];
|
|
||||||
if (filePath == nil)
|
|
||||||
filePath = [defs stringForKey: @"GSTempPath"];
|
|
||||||
if (filePath != nil
|
|
||||||
&& [delegate respondsToSelector: @selector(application:openTempFile:)])
|
|
||||||
{
|
{
|
||||||
[delegate application: self openTempFile: filePath];
|
[delegate application: self openTempFile: filePath];
|
||||||
}
|
}
|
||||||
|
@ -1114,8 +1103,7 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
|
||||||
|
|
||||||
ASSIGN(main_menu, aMenu);
|
ASSIGN(main_menu, aMenu);
|
||||||
|
|
||||||
[main_menu setTitle:
|
[main_menu setTitle: [[NSProcessInfo processInfo] processName]];
|
||||||
[[[NSProcessInfo processInfo] processName] lastPathComponent]];
|
|
||||||
[main_menu sizeToFit];
|
[main_menu sizeToFit];
|
||||||
/*
|
/*
|
||||||
* Find a menucell with the title Windows this is the default windows menu
|
* Find a menucell with the title Windows this is the default windows menu
|
||||||
|
|
Loading…
Reference in a new issue