Author SHA1 Message Date
Local Admin fe68c5c01d build fixes
Build macOS Packages / Build macOS (Intel) (push) Successful in 38s
Build macOS Packages / Build macOS (Apple Silicon) (push) Successful in 38s
Build macOS Packages / Build macOS (Universal) (push) Failing after 9s
2026-09-07 06:20:29 -07:00
2 changed files with 18 additions and 4 deletions
@@ -1,4 +1,5 @@
import AppKit
import UniformTypeIdentifiers
/// SPEC §9 three-pane window: thumbnails | canvas | inspector.
@@ -211,7 +212,15 @@ final class PreviewWindowController: NSWindowController {
let panel = NSOpenPanel()
panel.allowsMultipleSelection = true
panel.canChooseDirectories = false
if #available(macOS 12.0, *) {
var types: [UTType] = [.tiff, .json]
if let jobType = UTType(filenameExtension: "targetjob") {
types.append(jobType)
}
panel.allowedContentTypes = types
} else {
panel.allowedFileTypes = ["tif", "tiff", "targetjob", "json"]
}
panel.begin { result in
if result == .OK { completion(panel.urls) }
}
+7 -2
View File
@@ -82,12 +82,17 @@ enum ColorMatching {
static func stripColorMatchingAccessories(from panel: NSPrintPanel) {
let accessories = panel.accessoryControllers
for ac in accessories {
let title = (ac.title ?? "") + " " + (ac.nibName ?? "")
let cls = NSStringFromClass(type(of: ac))
let title = (ac.title ?? "") + " " + (ac.nibName ?? "") + " " + cls
let hay = title.lowercased()
if hay.contains("color matching") || hay.contains("colour matching") || hay.contains("colormatch") {
panel.removeAccessoryController(ac)
// SDK types this as NSViewController; removeAccessoryController
// requires NSPrintPanelAccessorizing (SPEC §7.2).
if let accessor = ac as? (NSViewController & NSPrintPanelAccessorizing) {
panel.removeAccessoryController(accessor)
TPLog.info("Removed print-panel accessory: \(title)")
}
}
}
}
}