6 Commits
12 changed files with 41 additions and 34 deletions

No files matched your search

+11 -11
View File
@@ -26,20 +26,20 @@
<rect key="frame" x="0.0" y="0.0" width="378" height="351"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="21" horizontalPageScroll="10" verticalLineScroll="21" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3">
<scrollView wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="23" horizontalPageScroll="10" verticalLineScroll="23" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3">
<rect key="frame" x="-1" y="46" width="380" height="306"/>
<clipView key="contentView" id="ix7-yM-0F6">
<rect key="frame" x="1" y="1" width="378" height="304"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" tableStyle="plain" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="7" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="378" height="304"/>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="19" rowSizeStyle="automatic" viewBased="YES" id="7" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="390" height="304"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="4"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="nameColumn" editable="NO" width="375" minWidth="40" maxWidth="3000" id="8">
<tableColumn identifier="nameColumn" editable="NO" width="378" minWidth="40" maxWidth="3000" id="8">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="nameColumn">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
@@ -52,25 +52,25 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView id="ofF-gY-wBR">
<rect key="frame" x="1" y="2" width="375" height="17"/>
<rect key="frame" x="1" y="2" width="387" height="19"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
<rect key="frame" x="29" y="-1" width="317" height="17"/>
<rect key="frame" x="29" y="2" width="329" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" id="srx-EJ-mK6">
<font key="font" metaFont="cellTitle"/>
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Xeb-eQ-90j">
<rect key="frame" x="7" y="0.0" width="16" height="16"/>
<rect key="frame" x="7" y="2" width="16" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="EncodeComplete" id="uXb-c3-MQO"/>
</imageView>
<button toolTip="Show item info" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="o98-wM-YAQ">
<rect key="frame" x="352" y="0.0" width="16" height="16"/>
<rect key="frame" x="364" y="2" width="16" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="info" imagePosition="overlaps" alignment="center" alternateImage="info-pressed" imageScaling="proportionallyDown" inset="2" id="AFW-1U-iaL">
<behavior key="behavior" lightByContents="YES"/>
@@ -99,8 +99,8 @@
</tableView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="6">
<rect key="frame" x="1" y="271" width="378" height="15"/>
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.25" horizontal="YES" id="6">
<rect key="frame" x="1" y="289" width="378" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="4">
+1
View File
@@ -38,6 +38,7 @@ final class ButtonToolbarItem : NSToolbarItem {
super.init(itemIdentifier: itemIdentifier)
self.label = label
self.paletteLabel = label
self.toolTip = toolTip
self.setSymbol(symbolName: symbolName, fallbackName: image)
self.action = action
+3 -3
View File
@@ -14,7 +14,7 @@ import Cocoa
@MainActor @objc optional func collectionViewPaste(to collectionView: NSCollectionView)
}
class CollectionView: NSCollectionView, NSMenuItemValidation {
class CollectionView: NSCollectionView, NSUserInterfaceValidations {
var pasteboardTypes: [NSPasteboard.PasteboardType]
var pasteboardHasSupportedType: Bool {
@@ -104,8 +104,8 @@ class CollectionView: NSCollectionView, NSMenuItemValidation {
}
}
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
if let action = menuItem.action {
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
if let action = item.action {
switch action {
case #selector(delete(_:)):
if isSelectionEmpty || implements(selector: #selector(CollectionViewDelegate.collectionViewDelete(in:))) == false {
+2
View File
@@ -76,6 +76,7 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
if #available(macOS 10.15, *) {
let item = NSMenuToolbarItem(itemIdentifier: itemIdentifier)
item.label = label
item.paletteLabel = label
if #available(macOS 11.0, *) {
item.image = NSImage.init(systemSymbolName: "ellipsis.circle", accessibilityDescription: nil)
} else {
@@ -96,6 +97,7 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
let item = ButtonToolbarItem(itemIdentifier: itemIdentifier)
item.label = label
item.paletteLabel = label
item.view = popUpButton
item.minSize = NSSize(width: 48, height: 16)
+4 -4
View File
@@ -14,7 +14,7 @@ import Cocoa
@MainActor @objc optional func paste(to tableview: NSTableView)
}
class ExpandedTableView: NSTableView, NSMenuItemValidation {
class ExpandedTableView: NSTableView {
var pasteboardTypes: [NSPasteboard.PasteboardType]
var pasteboardHasSupportedType: Bool {
@@ -114,8 +114,8 @@ class ExpandedTableView: NSTableView, NSMenuItemValidation {
}
}
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
if let action = menuItem.action {
override func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
if let action = item.action {
switch action {
case #selector(delete(_:)):
if selectedRow == -1 || implements(selector: #selector(ExpandedTableViewDelegate.deleteSelection(in:))) == false {
@@ -137,6 +137,6 @@ class ExpandedTableView: NSTableView, NSMenuItemValidation {
break
}
}
return true
return super.validateUserInterfaceItem(item)
}
}
+3 -3
View File
@@ -12,7 +12,7 @@ protocol FileImportControllerDelegate : AnyObject {
func didSelect(tracks: [MP42Track], metadata: MP42Metadata?)
}
final class FileImportController: ViewController, NSTableViewDataSource, NSTableViewDelegate, NSMenuItemValidation {
final class FileImportController: ViewController, NSTableViewDataSource, NSTableViewDelegate, NSUserInterfaceValidations {
private enum ItemType {
case file(MP42FileImporter)
@@ -245,8 +245,8 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
reloadCheckColumn(forRowIndexes: indexes)
}
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
if let action = menuItem.action,
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
if let action = item.action,
action == #selector(self.checkSelected(_:)) ||
action == #selector(self.uncheckSelected(_:)) ||
action == #selector(self.checkOnlyTracksWithSameLanguage(_:)) {
+3 -3
View File
@@ -8,7 +8,7 @@
import Cocoa
import MP42Foundation
final class OptionsViewController: NSViewController, NSMenuItemValidation {
final class OptionsViewController: NSViewController, NSUserInterfaceValidations {
@IBOutlet weak var sendToExternalApp: NSButton!
@IBOutlet var destButton: NSPopUpButton!
@@ -98,8 +98,8 @@ final class OptionsViewController: NSViewController, NSMenuItemValidation {
preparePresetsPopUp()
}
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
switch menuItem.action {
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
switch item.action {
case #selector(chooseDestination(_:)),
#selector(destination(_:)):
return true
+3 -3
View File
@@ -9,11 +9,11 @@ import Cocoa
class PrefsWindow: NSWindow {
override func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
if menuItem.action == #selector(NSWindow.toggleToolbarShown(_:)) {
override func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
if item.action == #selector(NSWindow.toggleToolbarShown(_:)) {
return false
}
return super.validateMenuItem(menuItem)
return super.validateUserInterfaceItem(item)
}
}
@@ -765,7 +765,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
func paste(to tableview: NSTableView) {
let pb = NSPasteboard.general
if let archivedData = pb.data(forType: .metadataDragType),
let data = try? NSKeyedUnarchiver.unarchivedObject(ofClasses: [MP42MetadataItem.classForCoder()], from: archivedData) as? [MP42MetadataItem] {
let data = try? NSKeyedUnarchiver.unarchivedObject(ofClasses: [NSArray.classForCoder(), MP42MetadataItem.classForCoder()], from: archivedData) as? [MP42MetadataItem] {
add(metadataItems: data)
}
}
+1 -1
View File
@@ -416,7 +416,7 @@ import MP42Foundation
statusInternal = QueueItem.Status(rawValue: Int(aDecoder.decodeInt32(forKey: "SBQueueItemStatus"))) ?? .failed
mp4File = aDecoder.decodeObject(of: [MP42File.classForCoder()], forKey: "SBQueueItemMp4File") as? MP42File
uniqueID = aDecoder.decodeObject(of: [NSString.classForCoder()], forKey: "SBQueueItemID") as! String
attributes = aDecoder.decodeObject(of: [NSDictionary.classForCoder()], forKey: "SBQueueItemAttributes") as! [String : Any]
attributes = aDecoder.decodeObject(of: [NSDictionary.classForCoder(), NSString.classForCoder(), NSNumber.classForCoder()], forKey: "SBQueueItemAttributes") as! [String : Any]
#if SB_SANDBOX
if var bookmark = aDecoder.decodeObject(of: [NSData.classForCoder()], forKey: "SBQueueItemFileURLBookmark") as? Data {
+5 -1
View File
@@ -1,11 +1,15 @@
# Subler News
## Subler 1.8.4
- Fixed metadata copy & paste
## Subler 1.8.3
- Reworked windows toolbars
- Improved AppleTV provider artworks matching to avoid showing unrelated artworks
- Fixed a regressione that broke ALAC muxing
- Fixed a regression that broke ALAC muxing
## Subler 1.8.2
+4 -4
View File
@@ -1390,7 +1390,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1.8.3;
CURRENT_PROJECT_VERSION = 1.8.4;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -1407,7 +1407,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.8.3;
MARKETING_VERSION = 1.8.4;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
OTHER_SWIFT_FLAGS = "";
@@ -1431,7 +1431,7 @@
CODE_SIGN_IDENTITY = "Mac Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.8.3;
CURRENT_PROJECT_VERSION = 1.8.4;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -1447,7 +1447,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.8.3;
MARKETING_VERSION = 1.8.4;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
OTHER_SWIFT_FLAGS = "";