diff options
author | Simon Howard | 2010-01-09 20:42:30 +0000 |
---|---|---|
committer | Simon Howard | 2010-01-09 20:42:30 +0000 |
commit | 45f543dbe6800827907fd78649d30480a6d0bd31 (patch) | |
tree | 23349b361a38dae2a7af92cd0ae581a28b54e1c5 /pkg/osx/LauncherManager.m | |
parent | c2f2fa12a68626a3d2a25231d0aa1c6146d555c3 (diff) | |
download | chocolate-doom-45f543dbe6800827907fd78649d30480a6d0bd31.tar.gz chocolate-doom-45f543dbe6800827907fd78649d30480a6d0bd31.tar.bz2 chocolate-doom-45f543dbe6800827907fd78649d30480a6d0bd31.zip |
Add file to command line when opened; add link from AppController to
LauncherManager.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1794
Diffstat (limited to 'pkg/osx/LauncherManager.m')
-rw-r--r-- | pkg/osx/LauncherManager.m | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/osx/LauncherManager.m b/pkg/osx/LauncherManager.m index ff90b987..52ce7f82 100644 --- a/pkg/osx/LauncherManager.m +++ b/pkg/osx/LauncherManager.m @@ -64,7 +64,17 @@ - (void) addFileToCommandLine: (NSString *) fileName forArgument: (NSString *) args { - // TODO + NSString *newCommandLine; +printf("Add file: %s %s\n", [args UTF8String], [fileName UTF8String]); + + newCommandLine = [self->commandLineArguments stringValue]; + newCommandLine = [newCommandLine stringByAppendingString: @" "]; + newCommandLine = [newCommandLine stringByAppendingString: args]; + newCommandLine = [newCommandLine stringByAppendingString: @" \""]; + newCommandLine = [newCommandLine stringByAppendingString: fileName]; + newCommandLine = [newCommandLine stringByAppendingString: @"\""]; + + [self->commandLineArguments setStringValue: newCommandLine]; } - (void) launch: (id)sender |