Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49262b2368 | ||
|
|
f24eea0f91 | ||
|
|
3b30d68597 | ||
|
|
e7a4d7af09 | ||
|
|
ad6c9dd132 | ||
|
|
94c0780be8 | ||
|
|
210fe7bf90 | ||
|
|
0a135b7040 | ||
|
|
a50a136e86 | ||
|
|
36c76fe5bd |
No files matched your search
+11
-11
@@ -26,20 +26,20 @@
|
|||||||
<rect key="frame" x="0.0" y="0.0" width="378" height="351"/>
|
<rect key="frame" x="0.0" y="0.0" width="378" height="351"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<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"/>
|
<rect key="frame" x="-1" y="46" width="380" height="306"/>
|
||||||
<clipView key="contentView" id="ix7-yM-0F6">
|
<clipView key="contentView" id="ix7-yM-0F6">
|
||||||
<rect key="frame" x="1" y="1" width="378" height="304"/>
|
<rect key="frame" x="1" y="1" width="378" height="304"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<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">
|
<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="378" height="304"/>
|
<rect key="frame" x="0.0" y="0.0" width="390" height="304"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<size key="intercellSpacing" width="3" height="4"/>
|
<size key="intercellSpacing" width="3" height="4"/>
|
||||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||||
<tableColumns>
|
<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">
|
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="nameColumn">
|
||||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
@@ -52,25 +52,25 @@
|
|||||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
|
||||||
<prototypeCellViews>
|
<prototypeCellViews>
|
||||||
<tableCellView id="ofF-gY-wBR">
|
<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"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
<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"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" id="srx-EJ-mK6">
|
<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="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||||
</textFieldCell>
|
</textFieldCell>
|
||||||
</textField>
|
</textField>
|
||||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Xeb-eQ-90j">
|
<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"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="EncodeComplete" id="uXb-c3-MQO"/>
|
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="EncodeComplete" id="uXb-c3-MQO"/>
|
||||||
</imageView>
|
</imageView>
|
||||||
<button toolTip="Show item info" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="o98-wM-YAQ">
|
<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"/>
|
<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">
|
<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"/>
|
<behavior key="behavior" lightByContents="YES"/>
|
||||||
@@ -99,8 +99,8 @@
|
|||||||
</tableView>
|
</tableView>
|
||||||
</subviews>
|
</subviews>
|
||||||
</clipView>
|
</clipView>
|
||||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="6">
|
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.25" horizontal="YES" id="6">
|
||||||
<rect key="frame" x="1" y="271" width="378" height="15"/>
|
<rect key="frame" x="1" y="289" width="378" height="16"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
</scroller>
|
</scroller>
|
||||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="4">
|
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="4">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</customObject>
|
</customObject>
|
||||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" toolbarStyle="expanded" id="s5f-yH-26m" userLabel="Window">
|
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" toolbarStyle="expanded" id="s5f-yH-26m" userLabel="Window">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="70" y="318" width="520" height="510"/>
|
<rect key="contentRect" x="70" y="318" width="520" height="510"/>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ final class ButtonToolbarItem : NSToolbarItem {
|
|||||||
super.init(itemIdentifier: itemIdentifier)
|
super.init(itemIdentifier: itemIdentifier)
|
||||||
|
|
||||||
self.label = label
|
self.label = label
|
||||||
|
self.paletteLabel = label
|
||||||
self.toolTip = toolTip
|
self.toolTip = toolTip
|
||||||
self.setSymbol(symbolName: symbolName, fallbackName: image)
|
self.setSymbol(symbolName: symbolName, fallbackName: image)
|
||||||
self.action = action
|
self.action = action
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
|
||||||
final class CheckBoxCellView : NSTableCellView {
|
final class CheckBoxCellView : NSTableCellView, ExpandedTableViewCellActionable {
|
||||||
@IBOutlet var checkboxButton: NSButton!
|
@IBOutlet var checkboxButton: NSButton!
|
||||||
|
|
||||||
|
func performAction() {
|
||||||
|
self.checkboxButton.performClick(self)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ import Cocoa
|
|||||||
@MainActor @objc optional func collectionViewPaste(to collectionView: NSCollectionView)
|
@MainActor @objc optional func collectionViewPaste(to collectionView: NSCollectionView)
|
||||||
}
|
}
|
||||||
|
|
||||||
class CollectionView: NSCollectionView, NSMenuItemValidation {
|
class CollectionView: NSCollectionView, NSUserInterfaceValidations {
|
||||||
|
|
||||||
var pasteboardTypes: [NSPasteboard.PasteboardType]
|
var pasteboardTypes: [NSPasteboard.PasteboardType]
|
||||||
var pasteboardHasSupportedType: Bool {
|
var pasteboardHasSupportedType: Bool {
|
||||||
@@ -67,6 +67,14 @@ class CollectionView: NSCollectionView, NSMenuItemValidation {
|
|||||||
else if key == 27 && isSelected {
|
else if key == 27 && isSelected {
|
||||||
deselectAll(self)
|
deselectAll(self)
|
||||||
}
|
}
|
||||||
|
else if self.isSelectionEmpty && (key == NSUpArrowFunctionKey || key == NSDownArrowFunctionKey) {
|
||||||
|
let indexPathSet = Set([IndexPath(item: 0, section: 0)])
|
||||||
|
animator().selectItems(at: indexPathSet, scrollPosition: .bottom)
|
||||||
|
delegate?.collectionView?(self, didSelectItemsAt: indexPathSet)
|
||||||
|
}
|
||||||
|
else if self.isSelectionEmpty && (key == NSRightArrowFunctionKey || key == NSLeftArrowFunctionKey) {
|
||||||
|
self.window?.windowController?.keyDown(with: event)
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
super.keyDown(with: event)
|
super.keyDown(with: event)
|
||||||
}
|
}
|
||||||
@@ -104,8 +112,8 @@ class CollectionView: NSCollectionView, NSMenuItemValidation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||||
if let action = menuItem.action {
|
if let action = item.action {
|
||||||
switch action {
|
switch action {
|
||||||
case #selector(delete(_:)):
|
case #selector(delete(_:)):
|
||||||
if isSelectionEmpty || implements(selector: #selector(CollectionViewDelegate.collectionViewDelete(in:))) == false {
|
if isSelectionEmpty || implements(selector: #selector(CollectionViewDelegate.collectionViewDelete(in:))) == false {
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
|
|||||||
if #available(macOS 10.15, *) {
|
if #available(macOS 10.15, *) {
|
||||||
let item = NSMenuToolbarItem(itemIdentifier: itemIdentifier)
|
let item = NSMenuToolbarItem(itemIdentifier: itemIdentifier)
|
||||||
item.label = label
|
item.label = label
|
||||||
|
item.paletteLabel = label
|
||||||
if #available(macOS 11.0, *) {
|
if #available(macOS 11.0, *) {
|
||||||
item.image = NSImage.init(systemSymbolName: "ellipsis.circle", accessibilityDescription: nil)
|
item.image = NSImage.init(systemSymbolName: "ellipsis.circle", accessibilityDescription: nil)
|
||||||
} else {
|
} else {
|
||||||
@@ -96,6 +97,7 @@ class DocumentToolbarDelegate: NSObject, NSToolbarDelegate {
|
|||||||
|
|
||||||
let item = ButtonToolbarItem(itemIdentifier: itemIdentifier)
|
let item = ButtonToolbarItem(itemIdentifier: itemIdentifier)
|
||||||
item.label = label
|
item.label = label
|
||||||
|
item.paletteLabel = label
|
||||||
item.view = popUpButton
|
item.view = popUpButton
|
||||||
item.minSize = NSSize(width: 48, height: 16)
|
item.minSize = NSSize(width: 48, height: 16)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,11 @@ import Cocoa
|
|||||||
@MainActor @objc optional func paste(to tableview: NSTableView)
|
@MainActor @objc optional func paste(to tableview: NSTableView)
|
||||||
}
|
}
|
||||||
|
|
||||||
class ExpandedTableView: NSTableView, NSMenuItemValidation {
|
protocol ExpandedTableViewCellActionable {
|
||||||
|
func performAction()
|
||||||
|
}
|
||||||
|
|
||||||
|
class ExpandedTableView: NSTableView {
|
||||||
|
|
||||||
var pasteboardTypes: [NSPasteboard.PasteboardType]
|
var pasteboardTypes: [NSPasteboard.PasteboardType]
|
||||||
var pasteboardHasSupportedType: Bool {
|
var pasteboardHasSupportedType: Bool {
|
||||||
@@ -59,12 +63,20 @@ class ExpandedTableView: NSTableView, NSMenuItemValidation {
|
|||||||
super.init(coder: coder)
|
super.init(coder: coder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func performAction() {
|
||||||
|
if let view = self.view(atColumn: defaultEditingColumn, row: selectedRow, makeIfNecessary: false) as? ExpandedTableViewCellActionable {
|
||||||
|
view.performAction()
|
||||||
|
} else {
|
||||||
|
editColumn(defaultEditingColumn, row: selectedRow, with: nil, select: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override func keyDown(with event: NSEvent) {
|
override func keyDown(with event: NSEvent) {
|
||||||
|
|
||||||
guard let key = event.charactersIgnoringModifiers?.utf16.first else { super.keyDown(with: event); return }
|
guard let key = event.charactersIgnoringModifiers?.utf16.first else { super.keyDown(with: event); return }
|
||||||
|
|
||||||
if (key == NSEnterCharacter || key == NSCarriageReturnCharacter) && defaultEditingColumn > 0 {
|
if (key == NSEnterCharacter || key == NSCarriageReturnCharacter) && defaultEditingColumn > 0 {
|
||||||
editColumn(defaultEditingColumn, row: selectedRow, with: nil, select: true)
|
performAction()
|
||||||
}
|
}
|
||||||
else if (key == NSDeleteCharacter || key == NSDeleteFunctionKey) && implements(selector: #selector(ExpandedTableViewDelegate.deleteSelection(in:))) {
|
else if (key == NSDeleteCharacter || key == NSDeleteFunctionKey) && implements(selector: #selector(ExpandedTableViewDelegate.deleteSelection(in:))) {
|
||||||
if selectedRow == -1 {
|
if selectedRow == -1 {
|
||||||
@@ -73,6 +85,9 @@ class ExpandedTableView: NSTableView, NSMenuItemValidation {
|
|||||||
expandedDelegate?.deleteSelection!(in: self)
|
expandedDelegate?.deleteSelection!(in: self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if key == NSRightArrowFunctionKey || key == NSLeftArrowFunctionKey {
|
||||||
|
self.window?.windowController?.keyDown(with: event)
|
||||||
|
}
|
||||||
else if key == 27 && selectedRow != -1 {
|
else if key == 27 && selectedRow != -1 {
|
||||||
deselectAll(self)
|
deselectAll(self)
|
||||||
}
|
}
|
||||||
@@ -114,8 +129,8 @@ class ExpandedTableView: NSTableView, NSMenuItemValidation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
override func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||||
if let action = menuItem.action {
|
if let action = item.action {
|
||||||
switch action {
|
switch action {
|
||||||
case #selector(delete(_:)):
|
case #selector(delete(_:)):
|
||||||
if selectedRow == -1 || implements(selector: #selector(ExpandedTableViewDelegate.deleteSelection(in:))) == false {
|
if selectedRow == -1 || implements(selector: #selector(ExpandedTableViewDelegate.deleteSelection(in:))) == false {
|
||||||
@@ -137,6 +152,6 @@ class ExpandedTableView: NSTableView, NSMenuItemValidation {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return super.validateUserInterfaceItem(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ protocol FileImportControllerDelegate : AnyObject {
|
|||||||
func didSelect(tracks: [MP42Track], metadata: MP42Metadata?)
|
func didSelect(tracks: [MP42Track], metadata: MP42Metadata?)
|
||||||
}
|
}
|
||||||
|
|
||||||
final class FileImportController: ViewController, NSTableViewDataSource, NSTableViewDelegate, NSMenuItemValidation {
|
final class FileImportController: ViewController, NSTableViewDataSource, NSTableViewDelegate, NSUserInterfaceValidations {
|
||||||
|
|
||||||
private enum ItemType {
|
private enum ItemType {
|
||||||
case file(MP42FileImporter)
|
case file(MP42FileImporter)
|
||||||
@@ -245,8 +245,8 @@ final class FileImportController: ViewController, NSTableViewDataSource, NSTable
|
|||||||
reloadCheckColumn(forRowIndexes: indexes)
|
reloadCheckColumn(forRowIndexes: indexes)
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||||
if let action = menuItem.action,
|
if let action = item.action,
|
||||||
action == #selector(self.checkSelected(_:)) ||
|
action == #selector(self.checkSelected(_:)) ||
|
||||||
action == #selector(self.uncheckSelected(_:)) ||
|
action == #selector(self.uncheckSelected(_:)) ||
|
||||||
action == #selector(self.checkOnlyTracksWithSameLanguage(_:)) {
|
action == #selector(self.checkOnlyTracksWithSameLanguage(_:)) {
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ class MetadataSearchViewController: ViewController, MetadataSearchControllerDele
|
|||||||
view.addSubview(metadataViewController.view)
|
view.addSubview(metadataViewController.view)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func viewDidAppear() {
|
||||||
|
self.view.window?.autorecalculatesKeyViewLoop = true
|
||||||
|
}
|
||||||
|
|
||||||
override func addChild(_ childViewController: NSViewController) {
|
override func addChild(_ childViewController: NSViewController) {
|
||||||
childViewController.view.frame.size = view.frame.size
|
childViewController.view.frame.size = view.frame.size
|
||||||
childViewController.view.autoresizingMask = [NSView.AutoresizingMask.width, NSView.AutoresizingMask.height]
|
childViewController.view.autoresizingMask = [NSView.AutoresizingMask.width, NSView.AutoresizingMask.height]
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15504"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import Cocoa
|
import Cocoa
|
||||||
import MP42Foundation
|
import MP42Foundation
|
||||||
|
|
||||||
final class OptionsViewController: NSViewController, NSMenuItemValidation {
|
final class OptionsViewController: NSViewController, NSUserInterfaceValidations {
|
||||||
|
|
||||||
@IBOutlet weak var sendToExternalApp: NSButton!
|
@IBOutlet weak var sendToExternalApp: NSButton!
|
||||||
@IBOutlet var destButton: NSPopUpButton!
|
@IBOutlet var destButton: NSPopUpButton!
|
||||||
@@ -98,8 +98,8 @@ final class OptionsViewController: NSViewController, NSMenuItemValidation {
|
|||||||
preparePresetsPopUp()
|
preparePresetsPopUp()
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||||
switch menuItem.action {
|
switch item.action {
|
||||||
case #selector(chooseDestination(_:)),
|
case #selector(chooseDestination(_:)),
|
||||||
#selector(destination(_:)):
|
#selector(destination(_:)):
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
|
||||||
final class PopUpCellView : NSTableCellView {
|
final class PopUpCellView : NSTableCellView, ExpandedTableViewCellActionable {
|
||||||
@IBOutlet var popUpButton: NSPopUpButton!
|
@IBOutlet var popUpButton: NSPopUpButton!
|
||||||
|
|
||||||
|
func performAction() {
|
||||||
|
self.popUpButton.performClick(self)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -9,11 +9,11 @@ import Cocoa
|
|||||||
|
|
||||||
class PrefsWindow: NSWindow {
|
class PrefsWindow: NSWindow {
|
||||||
|
|
||||||
override func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
|
override func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
|
||||||
if menuItem.action == #selector(NSWindow.toggleToolbarShown(_:)) {
|
if item.action == #selector(NSWindow.toggleToolbarShown(_:)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return super.validateMenuItem(menuItem)
|
return super.validateUserInterfaceItem(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -117,6 +117,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
|||||||
|
|
||||||
columnWidth = column.width
|
columnWidth = column.width
|
||||||
|
|
||||||
|
metadataTableView.defaultEditingColumn = 1
|
||||||
metadataTableView.doubleAction = #selector(doubleClickAction(_:))
|
metadataTableView.doubleAction = #selector(doubleClickAction(_:))
|
||||||
metadataTableView.target = self
|
metadataTableView.target = self
|
||||||
metadataTableView.pasteboardTypes = [.metadataDragType]
|
metadataTableView.pasteboardTypes = [.metadataDragType]
|
||||||
@@ -765,7 +766,7 @@ class MovieViewController: PropertyView, NSTableViewDataSource, ExpandedTableVie
|
|||||||
func paste(to tableview: NSTableView) {
|
func paste(to tableview: NSTableView) {
|
||||||
let pb = NSPasteboard.general
|
let pb = NSPasteboard.general
|
||||||
if let archivedData = pb.data(forType: .metadataDragType),
|
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)
|
add(metadataItems: data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ import MP42Foundation
|
|||||||
statusInternal = QueueItem.Status(rawValue: Int(aDecoder.decodeInt32(forKey: "SBQueueItemStatus"))) ?? .failed
|
statusInternal = QueueItem.Status(rawValue: Int(aDecoder.decodeInt32(forKey: "SBQueueItemStatus"))) ?? .failed
|
||||||
mp4File = aDecoder.decodeObject(of: [MP42File.classForCoder()], forKey: "SBQueueItemMp4File") as? MP42File
|
mp4File = aDecoder.decodeObject(of: [MP42File.classForCoder()], forKey: "SBQueueItemMp4File") as? MP42File
|
||||||
uniqueID = aDecoder.decodeObject(of: [NSString.classForCoder()], forKey: "SBQueueItemID") as! String
|
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 SB_SANDBOX
|
||||||
if var bookmark = aDecoder.decodeObject(of: [NSData.classForCoder()], forKey: "SBQueueItemFileURLBookmark") as? Data {
|
if var bookmark = aDecoder.decodeObject(of: [NSData.classForCoder()], forKey: "SBQueueItemFileURLBookmark") as? Data {
|
||||||
|
|||||||
+1
-1
Submodule MP42Foundation updated: aa541846bc...ce670fe788.
+12
-1
@@ -1,11 +1,22 @@
|
|||||||
# Subler News
|
# Subler News
|
||||||
|
|
||||||
|
|
||||||
|
## Subler 1.8.5
|
||||||
|
|
||||||
|
- Improved keyboard navigation in the document window
|
||||||
|
- Fixed FLAC audio decoding
|
||||||
|
|
||||||
|
|
||||||
|
## Subler 1.8.4
|
||||||
|
|
||||||
|
- Fixed metadata copy & paste
|
||||||
|
|
||||||
|
|
||||||
## Subler 1.8.3
|
## Subler 1.8.3
|
||||||
|
|
||||||
- Reworked windows toolbars
|
- Reworked windows toolbars
|
||||||
- Improved AppleTV provider artworks matching to avoid showing unrelated artworks
|
- 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
|
## Subler 1.8.2
|
||||||
|
|||||||
@@ -1390,7 +1390,7 @@
|
|||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 1.8.3;
|
CURRENT_PROJECT_VERSION = 1.8.5;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
@@ -1407,7 +1407,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.8.3;
|
MARKETING_VERSION = 1.8.5;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
||||||
OTHER_SWIFT_FLAGS = "";
|
OTHER_SWIFT_FLAGS = "";
|
||||||
@@ -1431,7 +1431,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1.8.3;
|
CURRENT_PROJECT_VERSION = 1.8.5;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
@@ -1447,7 +1447,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.8.3;
|
MARKETING_VERSION = 1.8.5;
|
||||||
OTHER_CFLAGS = "";
|
OTHER_CFLAGS = "";
|
||||||
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
OTHER_LDFLAGS = "-Wl,-rpath,@loader_path/../Frameworks";
|
||||||
OTHER_SWIFT_FLAGS = "";
|
OTHER_SWIFT_FLAGS = "";
|
||||||
|
|||||||
Reference in new issue
Block a user