diff options
author | dynaflash <[email protected]> | 2008-09-22 17:46:32 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-09-22 17:46:32 +0000 |
commit | a7fb7371bb83e6d244783de10e3006f618d44410 (patch) | |
tree | 8dd6583e24a6d22561821a2cc9817da36241663b | |
parent | 53058602694c8d17942dc874817b42cb9a6be51a (diff) |
MacGui: Re-enable deleting encodes with the delete key if hilighted.
- Currently one at a time, multiple selections are shut off for queue sync reasons .
- Note: To delete a finished encode, click on it and hit your delete key ( since the action icon is an "open file in finder" magnifying glass) as this is the only way currently to delete a finished encode.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1744 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/Controller.mm | 8 | ||||
-rw-r--r-- | macosx/English.lproj/Queue.xib | 12 | ||||
-rw-r--r-- | macosx/HBQueueController.mm | 13 |
3 files changed, 21 insertions, 12 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 38ff91540..46049cdc5 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1565,14 +1565,14 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It - (void) removeQueueFileItem:(int) queueItemToRemove { - /* Find out if the item we are removing is a cancelled item*/ - if ([[[QueueFileArray objectAtIndex:queueItemToRemove] objectForKey:@"Status"] intValue] == 3) + /* Find out if the item we are removing is a cancelled (3) or a finished (0) item*/ + if ([[[QueueFileArray objectAtIndex:queueItemToRemove] objectForKey:@"Status"] intValue] == 3 || [[[QueueFileArray objectAtIndex:queueItemToRemove] objectForKey:@"Status"] intValue] == 0) { - /* Since we are removing a cancelled item, WE need to decrement the currentQueueEncodeIndex + /* Since we are removing a cancelled or finished 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]; + [self writeToActivityLog: "removeQueueFileItem: Removing a cancelled/finished encode, decrement currentQueueEncodeIndex to %d", currentQueueEncodeIndex]; } [QueueFileArray removeObjectAtIndex:queueItemToRemove]; [self saveQueueFileItem]; diff --git a/macosx/English.lproj/Queue.xib b/macosx/English.lproj/Queue.xib index c64871915..667d263a3 100644 --- a/macosx/English.lproj/Queue.xib +++ b/macosx/English.lproj/Queue.xib @@ -8,7 +8,7 @@ <string key="IBDocument.HIToolboxVersion">352.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="2577"/> + <integer value="2596"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -204,7 +204,7 @@ </object> </object> <double key="NSRowHeight">1.700000e+01</double> - <int key="NSTvFlags">448823296</int> + <int key="NSTvFlags">314605568</int> <int key="NSColumnAutoresizingStyle">1</int> <int key="NSDraggingSourceMaskForLocal">15</int> <int key="NSDraggingSourceMaskForNonLocal">0</int> @@ -474,7 +474,7 @@ </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> - <string key="label">removeSelectedJobGroups:</string> + <string key="label">removeSelectedQueueItem:</string> <reference key="source" ref="678333032"/> <reference key="destination" ref="1065139278"/> </object> @@ -796,9 +796,9 @@ <integer value="1" id="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> - <string>{{311, 67}, {574, 423}}</string> + <string>{{170, 67}, {574, 423}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{311, 67}, {574, 423}}</string> + <string>{{170, 67}, {574, 423}}</string> <reference ref="9"/> <reference ref="9"/> <reference ref="9"/> @@ -945,7 +945,6 @@ <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>cancelCurrentJob:</string> - <string>removeSelectedJobGroups:</string> <string>revealSelectedJobGroups:</string> <string>togglePauseResume:</string> <string>toggleStartCancel:</string> @@ -956,7 +955,6 @@ <string>id</string> <string>id</string> <string>id</string> - <string>id</string> </object> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm index b32e4de3e..e1d01ccc8 100644 --- a/macosx/HBQueueController.mm +++ b/macosx/HBQueueController.mm @@ -485,7 +485,11 @@ if (fWorkingCount > 0) if ([[[fJobGroups objectAtIndex:row] objectForKey:@"Status"] intValue] == 1) { - NSString * alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It ?", nil)]; + /* We pause the encode here so that it doesn't finish right after and then + * screw up the sync while the window is open + */ + [fHBController Pause:NULL]; + NSString * alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It ?", nil)]; // Which window to attach the sheet to? NSWindow * docWindow; if ([sender respondsToSelector: @selector(window)]) @@ -512,6 +516,13 @@ if (fWorkingCount > 0) - (void) didDimissCancelCurrentJob: (NSWindow *)sheet returnCode: (int)returnCode contextInfo: (void *)contextInfo { + /* We resume encoding and perform the appropriate actions + * Note: Pause: is a toggle type method based on hb's current + * state, if it paused, it will resume encoding and vice versa. + * In this case, we are paused from the calling window, so calling + * [fHBController Pause:NULL]; Again will resume encoding + */ + [fHBController Pause:NULL]; if (returnCode == NSAlertOtherReturn) { /* We need to save the currently encoding item number first */ |