summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorSimon Howard2010-01-09 20:42:30 +0000
committerSimon Howard2010-01-09 20:42:30 +0000
commit45f543dbe6800827907fd78649d30480a6d0bd31 (patch)
tree23349b361a38dae2a7af92cd0ae581a28b54e1c5 /pkg
parentc2f2fa12a68626a3d2a25231d0aa1c6146d555c3 (diff)
downloadchocolate-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')
-rw-r--r--pkg/osx/LauncherManager.m12
-rw-r--r--pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib4
-rw-r--r--pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nibbin17360 -> 17451 bytes
3 files changed, 13 insertions, 3 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
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 @@
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
- <integer>21</integer>
- <integer>29</integer>
<integer>227</integer>
+ <integer>29</integer>
+ <integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>8S2167</string>
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
--- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib
+++ b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib
Binary files differ