From ed9facff98fcce2020945d001303f44343c86b84 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 31 Aug 2018 17:50:07 +0200 Subject: [PATCH] MacGui: Implement "Show Source in Finder" in the queue contextual menu. --- macosx/Base.lproj/Queue.xib | 24 +++++++++++++++--------- macosx/HBQueueController.m | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 10 deletions(-) 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) -- 2.40.0