summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/HBJob.m22
-rw-r--r--macosx/HBQueueController.m2
-rw-r--r--macosx/HBQueueTableViewController.m17
-rw-r--r--macosx/HBTitle.m7
4 files changed, 17 insertions, 31 deletions
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index 669d059b5..b317088f4 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -453,28 +453,10 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
#ifdef __SANDBOX_ENABLED__
decodeObject(_fileURLBookmark, NSData)
-
- if (_fileURLBookmark)
- {
- _fileURL = [HBUtilities URLFromBookmark:_fileURLBookmark];
- }
-
- if (!_fileURL)
- {
- decodeObjectOrFail(_fileURL, NSURL);
- }
+ decodeObjectOrFail(_fileURL, NSURL);
decodeObject(_outputURLFolderBookmark, NSData)
-
- if (_outputURLFolderBookmark)
- {
- _outputURL = [HBUtilities URLFromBookmark:_outputURLFolderBookmark];
- }
-
- if (!_outputURL)
- {
- decodeObject(_outputURL, NSURL);
- }
+ decodeObject(_outputURL, NSURL);
#else
decodeObjectOrFail(_fileURL, NSURL);
decodeObject(_outputURL, NSURL);
diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m
index f39a5883c..86654e19b 100644
--- a/macosx/HBQueueController.m
+++ b/macosx/HBQueueController.m
@@ -462,7 +462,7 @@ NSString * const HBQueueItemNotificationPathKey = @"HBQueueItemNotificationPathK
if ([path isKindOfClass:[NSString class]] && path.length)
{
NSURL *fileURL = [NSURL fileURLWithPath:path];
- [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:@[fileURL]];
+ [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:@[fileURL]];
}
}
diff --git a/macosx/HBQueueTableViewController.m b/macosx/HBQueueTableViewController.m
index f414ba625..e42a78aa3 100644
--- a/macosx/HBQueueTableViewController.m
+++ b/macosx/HBQueueTableViewController.m
@@ -126,7 +126,10 @@
currentIndex = [targetedRows indexGreaterThanIndex:currentIndex];
}
- [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:urls];
+ if (urls.count)
+ {
+ [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:urls];
+ }
}
- (IBAction)revealSelectedQueueItemsSources:(id)sender
@@ -141,7 +144,10 @@
currentIndex = [targetedRows indexGreaterThanIndex:currentIndex];
}
- [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:urls];
+ if (urls.count)
+ {
+ [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:urls];
+ }
}
- (IBAction)revealSelectedQueueItemsActivityLogs:(id)sender
@@ -159,7 +165,10 @@
currentIndex = [targetedRows indexGreaterThanIndex:currentIndex];
}
- [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:urls];
+ if (urls.count)
+ {
+ [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:urls];
+ }
}
/**
@@ -273,7 +282,7 @@
- (void)revealQueueItem:(nonnull HBQueueItem *)item
{
- [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:@[item.completeOutputURL]];
+ [NSWorkspace.sharedWorkspace activateFileViewerSelectingURLs:@[item.completeOutputURL]];
}
#pragma mark NSTableView delegate
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m
index 3a728a4ef..3591a4df8 100644
--- a/macosx/HBTitle.m
+++ b/macosx/HBTitle.m
@@ -229,12 +229,7 @@ fail:
if (_bookmark)
{
- _fileURL = [HBUtilities URLFromBookmark:_bookmark];
-
- if (!_fileURL)
- {
- decodeObjectOrFail(_fileURL, NSURL);
- }
+ decodeObjectOrFail(_fileURL, NSURL);
}
#else
decodeObject(_fileURL, NSURL);