Set the minimum deplyoment target to 10.13.
This commit is contained in:
6 files changed
+16
-39
No files matched your search
@@ -261,12 +261,7 @@ final class ArtworkSelectorController: NSViewController, NSCollectionViewDataSou
|
||||
let range = (artworks.count - endIndex ..< artworks.count)
|
||||
let indexes = range.map { IndexPath(item: $0, section: 0)}
|
||||
|
||||
if #available(OSX 10.13, *) {
|
||||
imageBrowser.insertItems(at: Set(indexes))
|
||||
} else {
|
||||
// Call this on 10.12 and 10.11 to avoid a crash
|
||||
imageBrowser.reloadData()
|
||||
}
|
||||
imageBrowser.insertItems(at: Set(indexes))
|
||||
}
|
||||
|
||||
private func selectArtwork(type: ArtworkType, size: ArtworkSize, service: String) {
|
||||
|
||||
@@ -44,7 +44,7 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
sendToQueue.image = NSImage(named: NSImage.shareTemplateName);
|
||||
|
||||
window.contentViewController = splitViewController
|
||||
window.registerForDraggedTypes([NSPasteboard.PasteboardType.backwardsCompatibleFileURL])
|
||||
window.registerForDraggedTypes([NSPasteboard.PasteboardType.fileURL])
|
||||
|
||||
if Prefs.rememberDocumentWindowSize {
|
||||
window.setFrameAutosaveName("documentSave")
|
||||
@@ -524,7 +524,7 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
|
||||
func draggingEntered(_ sender: NSDraggingInfo) -> NSDragOperation {
|
||||
guard let types = sender.draggingPasteboard.types,
|
||||
types.contains(NSPasteboard.PasteboardType.backwardsCompatibleFileURL) &&
|
||||
types.contains(NSPasteboard.PasteboardType.fileURL) &&
|
||||
sender.draggingSourceOperationMask.contains(.copy)
|
||||
else { return [] }
|
||||
|
||||
@@ -534,7 +534,7 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
func performDragOperation(_ sender: NSDraggingInfo) -> Bool {
|
||||
let pasteboard = sender.draggingPasteboard
|
||||
guard let types = pasteboard.types,
|
||||
types.contains(NSPasteboard.PasteboardType.backwardsCompatibleFileURL),
|
||||
types.contains(NSPasteboard.PasteboardType.fileURL),
|
||||
let items = pasteboard.readObjects(forClasses: [NSURL.classForCoder()], options: [:]) as? [URL]
|
||||
else { return false }
|
||||
|
||||
|
||||
@@ -55,15 +55,13 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
override func windowDidLoad() {
|
||||
super.windowDidLoad()
|
||||
|
||||
if #available(OSX 10.12, *) {
|
||||
window?.tabbingMode = .disallowed
|
||||
}
|
||||
window?.tabbingMode = .disallowed
|
||||
|
||||
if #available(macOS 11, *) {
|
||||
window?.toolbarStyle = .unifiedCompact
|
||||
window?.toolbarStyle = .expanded
|
||||
}
|
||||
|
||||
table.registerForDraggedTypes([NSPasteboard.PasteboardType.backwardsCompatibleFileURL, tablePasteboardType])
|
||||
table.registerForDraggedTypes([NSPasteboard.PasteboardType.fileURL, tablePasteboardType])
|
||||
progressBar.isHidden = true
|
||||
|
||||
let main = OperationQueue.main
|
||||
@@ -771,7 +769,7 @@ final class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDel
|
||||
|
||||
} else {
|
||||
|
||||
if pboard.types?.contains(NSPasteboard.PasteboardType.backwardsCompatibleFileURL) ?? false {
|
||||
if pboard.types?.contains(NSPasteboard.PasteboardType.fileURL) ?? false {
|
||||
if let items = pboard.readObjects(forClasses: [NSURL.classForCoder()], options: [:]) as? [URL] {
|
||||
insert(contentOf: items, at: row)
|
||||
}
|
||||
|
||||
@@ -7,16 +7,6 @@
|
||||
|
||||
import Cocoa
|
||||
|
||||
extension NSPasteboard.PasteboardType {
|
||||
static let backwardsCompatibleFileURL: NSPasteboard.PasteboardType = {
|
||||
if #available(OSX 10.13, *) {
|
||||
return NSPasteboard.PasteboardType.fileURL
|
||||
} else {
|
||||
return NSPasteboard.PasteboardType(kUTTypeFileURL as String)
|
||||
}
|
||||
} ()
|
||||
}
|
||||
|
||||
enum PrivacyConsentState {
|
||||
case unknown
|
||||
case granted
|
||||
|
||||
Reference in new issue
Block a user