summaryrefslogtreecommitdiff
path: root/pkg/osx/AppController.m
diff options
context:
space:
mode:
authorSimon Howard2010-01-11 19:10:42 +0000
committerSimon Howard2010-01-11 19:10:42 +0000
commit160ff32f2fb8ba7112938790044684c61a0b07b1 (patch)
tree443a33199272a9081ccf5863b0df52bcedaaafe7 /pkg/osx/AppController.m
parent550b95f79cf8022acc5b335f6ef948b32cd2c615 (diff)
downloadchocolate-doom-160ff32f2fb8ba7112938790044684c61a0b07b1.tar.gz
chocolate-doom-160ff32f2fb8ba7112938790044684c61a0b07b1.tar.bz2
chocolate-doom-160ff32f2fb8ba7112938790044684c61a0b07b1.zip
Insert new files into the command line at the correct location, allowing
multiple files to be opened at once. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1803
Diffstat (limited to 'pkg/osx/AppController.m')
-rw-r--r--pkg/osx/AppController.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/osx/AppController.m b/pkg/osx/AppController.m
index 03a5965b..32afd9c4 100644
--- a/pkg/osx/AppController.m
+++ b/pkg/osx/AppController.m
@@ -46,6 +46,8 @@
{
}
+ self->filesAdded = NO;
+
return self;
}
@@ -79,6 +81,17 @@
{
NSString *extension;
+ // If this is the first file added, clear out the existing
+ // command line. This allows us to select multiple files
+ // in the finder and open them all together (for TCs, etc).
+
+ if (!self->filesAdded)
+ {
+ [self->launcherManager clearCommandLine];
+ }
+
+ // Add file with appropriate command line option based on extension:
+
extension = [fileName pathExtension];
if (![extension caseInsensitiveCompare: @"wad"])
@@ -96,6 +109,8 @@
return NO;
}
+ self->filesAdded = YES;
+
return YES;
}