From: Damiano Galassi Date: Fri, 31 Aug 2018 15:50:07 +0000 (+0200) Subject: MacGui: Implement "Show Source in Finder" in the queue contextual menu. X-Git-Tag: 1.2.0~175 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed9facff98fcce2020945d001303f44343c86b84;p=handbrake MacGui: Implement "Show Source in Finder" in the queue contextual menu. --- diff --git a/macosx/Base.lproj/Queue.xib b/macosx/Base.lproj/Queue.xib index 91b0a48f1..8c1906e35 100644 --- a/macosx/Base.lproj/Queue.xib +++ b/macosx/Base.lproj/Queue.xib @@ -1,8 +1,8 @@ - + - + @@ -28,13 +28,13 @@ - + - + - + @@ -87,12 +87,12 @@ - + - + @@ -100,7 +100,7 @@ - + @@ -178,7 +178,13 @@ - + + + + + + + diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m index ea9159766..519aef569 100644 --- a/macosx/HBQueueController.m +++ b/macosx/HBQueueController.m @@ -1111,7 +1111,7 @@ - (IBAction)revealSelectedQueueItems:(id)sender { NSIndexSet *targetedRows = [self.outlineView targetedRowIndexes]; - NSMutableArray *urls = [[NSMutableArray alloc] init]; + NSMutableArray *urls = [[NSMutableArray alloc] init]; NSUInteger currentIndex = [targetedRows firstIndex]; while (currentIndex != NSNotFound) { @@ -1123,6 +1123,21 @@ [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:urls]; } +- (IBAction)revealSelectedQueueItemsSources:(id)sender +{ + NSIndexSet *targetedRows = [self.outlineView targetedRowIndexes]; + NSMutableArray *urls = [[NSMutableArray alloc] init]; + + NSUInteger currentIndex = [targetedRows firstIndex]; + while (currentIndex != NSNotFound) { + NSURL *url = [[self.jobs objectAtIndex:currentIndex] fileURL]; + [urls addObject:url]; + currentIndex = [targetedRows indexGreaterThanIndex:currentIndex]; + } + + [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:urls]; +} + - (void)remindUserOfSleepOrShutdown { if ([[NSUserDefaults standardUserDefaults] integerForKey:@"HBAlertWhenDone"] == HBDoneActionSleep)