From 160ff32f2fb8ba7112938790044684c61a0b07b1 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 11 Jan 2010 19:10:42 +0000 Subject: 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 --- pkg/osx/AppController.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pkg/osx/AppController.m') 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; } -- cgit v1.2.3