diff options
author | dynaflash <[email protected]> | 2008-09-29 15:32:51 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-09-29 15:32:51 +0000 |
commit | eac44be1bada7e322819ef1031c021e5fb1bd257 (patch) | |
tree | 7f479a787aa3e76d57b8fcebb413aec2c97d3088 /macosx | |
parent | 07505596a90729513f861f6e9bc3ece0bf878f91 (diff) |
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
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.mm | 18 |
1 files changed, 9 insertions, 9 deletions
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; |