From 45f543dbe6800827907fd78649d30480a6d0bd31 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 9 Jan 2010 20:42:30 +0000 Subject: Add file to command line when opened; add link from AppController to LauncherManager. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1794 --- pkg/osx/LauncherManager.m | 12 +++++++++++- .../Contents/Resources/launcher.nib/info.nib | 4 ++-- .../Resources/launcher.nib/keyedobjects.nib | Bin 17360 -> 17451 bytes 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'pkg') 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 diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib index aecf812a..21e3bb1d 100644 --- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib +++ b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib @@ -13,9 +13,9 @@ 446.1 IBOpenObjects - 21 - 29 227 + 29 + 21 IBSystem Version 8S2167 diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib index 345ce976..680eaff7 100644 Binary files a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib and b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib differ -- cgit v1.2.3