summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-09-18 16:11:12 +0000
committerdynaflash <[email protected]>2008-09-18 16:11:12 +0000
commit636794fcffc0c451b557aeaa977c5fde37cced66 (patch)
tree550ff2ff16cab50a1ecf24960629187338af8962 /macosx/Controller.mm
parentaf19a2054fde10527750ebceb61892e2a3cf1af6 (diff)
MacGui: Queue allow proper deleting of encoding queue items and proper deleting of previously cancelled items. Also fixed Pause.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1716 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm17
1 files changed, 12 insertions, 5 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 198439013..483dc8523 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -1536,8 +1536,15 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
- (void) removeQueueFileItem:(int) queueItemToRemove
{
- // FIX ME: WE NEED TO IDENTIFY AN ENCODING ITEM AND CALL
-
+ // NSMutableDictionary * queueToApply = [QueueFileArray objectAtIndex:currentQueueEncodeIndex];
+ if ([[[QueueFileArray objectAtIndex:queueItemToRemove] objectForKey:@"Status"] intValue] == 3) //<-- Find out if the item we are removing is a cancelled item
+ {
+ /* Since we are removing a cancelled item, WE need to decrement the currentQueueEncodeIndex
+ * by one to keep in sync with the queue array
+ */
+ currentQueueEncodeIndex--;
+ [self writeToActivityLog: "removeQueueFileItem: Removing a cancelled encode, decrement currentQueueEncodeIndex to %d", currentQueueEncodeIndex];
+ }
[QueueFileArray removeObjectAtIndex:queueItemToRemove];
[self saveQueueFileItem];
@@ -3000,15 +3007,15 @@ fWorkingCount = 0;
- (IBAction) Pause: (id) sender
{
hb_state_t s;
- hb_get_state2( fHandle, &s );
+ hb_get_state2( fQueueEncodeLibhb, &s );
if( s.state == HB_STATE_PAUSED )
{
- hb_resume( fHandle );
+ hb_resume( fQueueEncodeLibhb );
}
else
{
- hb_pause( fHandle );
+ hb_pause( fQueueEncodeLibhb );
}
}