summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-12-12 02:40:21 +0000
committerdynaflash <[email protected]>2008-12-12 02:40:21 +0000
commit53d51e1e9ca1e766bcaa92360cc77e48f0b6d46a (patch)
tree31b0073dee13d3a5831990a50094d0fc6b7ace7a /macosx/Controller.mm
parent3cbb0bd29a2d3e4a9c1046f18e636c17baef65b2 (diff)
MacGui: Add a preference so we can specify what we do at launch, choices are:
- Do Nothing - Open Source - Open Source (Title Specific) - Pref defaults to Open Source git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2020 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm24
1 files changed, 19 insertions, 5 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 0a8428221..dc2dacd65 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -158,10 +158,16 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
}
else
{
+ /* We show whichever open source window specified in LaunchSourceBehavior preference key */
+ if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"LaunchSourceBehavior"] isEqualToString: @"Open Source"])
+ {
+ [self browseSources:nil];
+ }
- /* Show Browse Sources Window ASAP */
- [self performSelectorOnMainThread:@selector(browseSources:)
- withObject:nil waitUntilDone:NO];
+ if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"LaunchSourceBehavior"] isEqualToString: @"Open Source (Title Specific)"])
+ {
+ [self browseSources:(id)fOpenSourceTitleMMenu];
+ }
}
}
@@ -170,8 +176,16 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
if (returnCode == NSAlertOtherReturn)
{
[self clearQueueAllItems];
- [self performSelectorOnMainThread:@selector(browseSources:)
- withObject:nil waitUntilDone:NO];
+ /* We show whichever open source window specified in LaunchSourceBehavior preference key */
+ if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"LaunchSourceBehavior"] isEqualToString: @"Open Source"])
+ {
+ [self browseSources:nil];
+ }
+
+ if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"LaunchSourceBehavior"] isEqualToString: @"Open Source (Title Specific)"])
+ {
+ [self browseSources:(id)fOpenSourceTitleMMenu];
+ }
}
else
{