diff options
author | dynaflash <[email protected]> | 2007-09-14 04:42:46 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-09-14 04:42:46 +0000 |
commit | f45d2e22f0e02eda4f932632d21401c1b2c64f2a (patch) | |
tree | 06972759d183f364e2265648d95287e74d1ed414 /macosx/Controller.mm | |
parent | a928934f6fb284c46ee701bbdb401df04c59dc8c (diff) |
MacGui: New Queue Enhancements courtesy of travistex
- New hierarchical queue view.
- New Start/Cancel and Pause/Resume buttons in Queue toolbar to match those in the main window.
- When canceling a job, you now have the option to delete all pending jobs.
- This one is the real deal!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@963 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r-- | macosx/Controller.mm | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 253e0ee2e..d92619a82 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1828,6 +1828,15 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It +//------------------------------------------------------------------------------------ +// Removes all jobs from the queue. Does not cancel the current processing job. +//------------------------------------------------------------------------------------ +- (void) doDeleteQueuedJobs +{ + hb_job_t * job; + while( ( job = hb_job( fHandle, 0 ) ) ) + hb_rem( fHandle, job ); +} //------------------------------------------------------------------------------------ // Cancels the current job and proceeds with the next one in the queue. @@ -1869,7 +1878,10 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It NSBeginCriticalAlertSheet( alertTitle, - NSLocalizedString(@"Keep Encoding", nil), NSLocalizedString(@"Stop Encoding", nil), nil, docWindow, self, + NSLocalizedString(@"Keep Encoding", nil), + NSLocalizedString(@"Delete All", nil), + NSLocalizedString(@"Stop Encoding", nil), + docWindow, self, nil, @selector(didDimissCancelCurrentJob:returnCode:contextInfo:), nil, NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", nil), [NSString stringWithUTF8String:job->title->name]); @@ -1886,8 +1898,13 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It - (void) didDimissCancelCurrentJob: (NSWindow *)sheet returnCode: (int)returnCode contextInfo: (void *)contextInfo { - if (returnCode == NSAlertAlternateReturn) + if (returnCode == NSAlertOtherReturn) [self doCancelCurrentJob]; + else if (returnCode == NSAlertAlternateReturn) + { + [self doDeleteQueuedJobs]; + [self doCancelCurrentJob]; + } } |