From eac44be1bada7e322819ef1031c021e5fb1bd257 Mon Sep 17 00:00:00 2001 From: dynaflash Date: Mon, 29 Sep 2008 15:32:51 +0000 Subject: MacGui: Fix warning windows when shutting down HandBrake during encoding or if there are still pending items in the queue. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1784 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.mm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'macosx') diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 904b4a17d..eaad5466e 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -175,20 +175,20 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It - (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) app { + // Warn if encoding a movie hb_state_t s; - hb_get_state( fHandle, &s ); + hb_get_state( fQueueEncodeLibhb, &s ); if ( s.state != HB_STATE_IDLE ) { int result = NSRunCriticalAlertPanel( - NSLocalizedString(@"Are you sure you want to quit HandBrake?", nil), - NSLocalizedString(@"If you quit HandBrake, your movie will be lost. Do you want to quit anyway?", nil), - NSLocalizedString(@"Quit", nil), NSLocalizedString(@"Don't Quit", nil), nil, @"A movie" ); + NSLocalizedString(@"Are you sure you want to quit HandBrake?", nil), + NSLocalizedString(@"If you quit HandBrake your current encode will be reloaded into your queue at next launch. Do you want to quit anyway?", nil), + NSLocalizedString(@"Quit", nil), NSLocalizedString(@"Don't Quit", nil), nil, @"A movie" ); if (result == NSAlertDefaultReturn) { - [self doCancelCurrentJob]; return NSTerminateNow; } else @@ -196,12 +196,12 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It } // Warn if items still in the queue - else if ( hb_count( fHandle ) > 0 ) + else if ( fPendingCount > 0 ) { int result = NSRunCriticalAlertPanel( - NSLocalizedString(@"Are you sure you want to quit HandBrake?", nil), - NSLocalizedString(@"One or more encodes are queued for encoding. Do you want to quit anyway?", nil), - NSLocalizedString(@"Quit", nil), NSLocalizedString(@"Don't Quit", nil), nil); + NSLocalizedString(@"Are you sure you want to quit HandBrake?", nil), + NSLocalizedString(@"There are pending encodes in your queue. Do you want to quit anyway?",nil), + NSLocalizedString(@"Quit", nil), NSLocalizedString(@"Don't Quit", nil), nil); if ( result == NSAlertDefaultReturn ) return NSTerminateNow; -- cgit v1.2.3