mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Understand GSFilePath and GSTempPath arugments
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4208 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
705a71ed6d
commit
20d88461fb
1 changed files with 15 additions and 0 deletions
|
@ -180,6 +180,8 @@ NSApplication *NSApp = nil;
|
|||
NSDictionary *infoDict = [mainBundle infoDictionary];
|
||||
NSString *mainModelFile;
|
||||
NSString *appIconFile;
|
||||
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
|
||||
NSString *filePath;
|
||||
|
||||
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
|
||||
if (mainModelFile && ![mainModelFile isEqual: @""])
|
||||
|
@ -210,6 +212,19 @@ NSApplication *NSApp = nil;
|
|||
/* finish the launching post notification that launching has finished */
|
||||
[nc postNotificationName: NSApplicationDidFinishLaunchingNotification
|
||||
object: self];
|
||||
|
||||
/*
|
||||
* Now check to see if we were launched with arguments asking to
|
||||
* open a file.
|
||||
*/
|
||||
if ((filePath = [defs stringForKey: @"GSFilePath"]) != nil)
|
||||
{
|
||||
[self application: self openFile: filePath];
|
||||
}
|
||||
else if ((filePath = [defs stringForKey: @"GSTempPath"]) != nil)
|
||||
{
|
||||
[self application: self openTempFile: filePath];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
|
|
Loading…
Reference in a new issue