summaryrefslogtreecommitdiffstats
path: root/macosx/HBAppDelegate.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-04-30 16:57:16 +0000
committerritsuka <[email protected]>2015-04-30 16:57:16 +0000
commitdfd798df39d70f6e6f544d658552bd1b9b5a40a3 (patch)
treef462d5f415f079a7620c2a11484a6efa8acafcc1 /macosx/HBAppDelegate.m
parent617dbd847bc9d0b395f83c1bc00ce688491d48fc (diff)
MacGui: fix the multiple instances alert.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7138 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAppDelegate.m')
-rw-r--r--macosx/HBAppDelegate.m31
1 files changed, 15 insertions, 16 deletions
diff --git a/macosx/HBAppDelegate.m b/macosx/HBAppDelegate.m
index 23ddf3d01..03e10a921 100644
--- a/macosx/HBAppDelegate.m
+++ b/macosx/HBAppDelegate.m
@@ -90,26 +90,25 @@
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"OutputPanelIsOpen"])
[self showOutputPanel:nil];
+ // On Screen Notification
+ // We check to see if there is already another instance of hb running.
+ if (instances > 1)
+ {
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert setMessageText:NSLocalizedString(@"There is already an instance of HandBrake running.", nil)];
+ [alert setInformativeText:NSLocalizedString(@"The queue will be shared between the instances.", nil)];
+ [alert runModal];
+ }
+ else
+ {
+ [self.queueController setEncodingJobsAsPending];
+ [self.queueController removeCompletedJobs];
+ }
+
// Now we re-check the queue array to see if there are
// any remaining encodes to be done
if (self.queueController.count)
{
- // On Screen Notification
- // We check to see if there is already another instance of hb running.
- // Note: hbInstances == 1 means we are the only instance of HandBrake.app
- NSAlert *alert = nil;
- if (instances > 1)
- {
- alert = [[NSAlert alloc] init];
- [alert setMessageText:NSLocalizedString(@"There is already an instance of HandBrake running.", @"")];
- [alert setInformativeText:NSLocalizedString(@"HandBrake will now load up the existing queue.", nil)];
- [alert addButtonWithTitle:NSLocalizedString(@"Reload Queue", nil)];
- }
- else
- {
- [self.queueController setEncodingJobsAsPending];
- [self.queueController removeCompletedJobs];
- }
[self showMainWindow:self];
[self showQueueWindow:self];
}