diff options
author | dynaflash <[email protected]> | 2010-01-12 21:22:54 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-01-12 21:22:54 +0000 |
commit | 08485e0ceb1477500971719cdea1d7f80eb9421c (patch) | |
tree | 9e44b2d84aed140123cf905ee7a0b4a2b7436d0b /macosx/Controller.m | |
parent | b1a380c995965f816a70431a582634549801cdc7 (diff) |
MacGui: Add the ability to send the finished encode to any application the user chooses instead of just "Send to MetaX".
- Retains a checkbox to acivate sending the finished encode
- Adds a file name textfield and a browse button so user can choose the app to send the finished encode to.
- Defaults to MetaX as this would be the only app already existing in the users prefs.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3068 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r-- | macosx/Controller.m | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 4655a8792..7a093c25c 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1381,9 +1381,15 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It /* This end of encode action is called as each encode rolls off of the queue */ if([[NSUserDefaults standardUserDefaults] boolForKey: @"sendToMetaX"] == YES) { - NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource: [NSString stringWithFormat: @"%@%@%@", @"tell application \"MetaX\" to open (POSIX file \"", filePath, @"\")"]]; - [myScript executeAndReturnError: nil]; - [myScript release]; + NSString *sendToApp = [[NSUserDefaults standardUserDefaults] objectForKey: @"SendCompletedEncodeToApp"]; + if (![sendToApp isEqualToString:@"None"]) + { + [self writeToActivityLog: "trying to send encode to: %s", [sendToApp UTF8String]]; + NSAppleScript *myScript = [[NSAppleScript alloc] initWithSource: [NSString stringWithFormat: @"%@%@%@%@%@", @"tell application \"",sendToApp,@"\" to open (POSIX file \"", filePath, @"\")"]]; + [myScript executeAndReturnError: nil]; + [myScript release]; + } + } } #pragma mark - |