Fix layout issues.

This commit is contained in:
Damiano Galassi committed 2020-08-06 09:31:25 +02:00
1 parent 1b92b76bad
commit ab52a8e0f6
8 files changed
+102 -116

No files matched your search

+12 -24
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17132.0.2" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17147" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17132.0.2"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17147"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -33,9 +33,7 @@
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="Af5-ai-sw9"/>
<toolbarItem implicitItemIdentifier="NSToolbarSpaceItem" id="qX7-s1-81X"/>
<toolbarItem implicitItemIdentifier="NSToolbarSeparatorItem" id="mX6-y6-VZe"/>
<toolbarItem implicitItemIdentifier="D2E8E21C-DCD4-456F-B15A-9AC0AA5556DF" label="Import" paletteLabel="Import" toolTip="Import tracks from external files" image="NSAddTemplate" id="FY3-O2-t3T" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<size key="minSize" width="36" height="24"/>
<size key="maxSize" width="36" height="28"/>
<toolbarItem implicitItemIdentifier="D2E8E21C-DCD4-456F-B15A-9AC0AA5556DF" label="Import" paletteLabel="Import" toolTip="Import tracks from external files" image="NSAddTemplate" sizingBehavior="auto" id="FY3-O2-t3T" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<button key="view" verticalHuggingPriority="750" id="UZy-eh-ZBz">
<rect key="frame" x="3" y="14" width="36" height="28"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
@@ -48,9 +46,7 @@
<action selector="selectFile:" target="-2" id="mTY-vt-vsv"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="5B6FDF6D-9486-49B2-8EA4-184D76D0864C" label="Delete Track" paletteLabel="Delete Track" toolTip="Delete the selected track" image="ToolbarRemoveTemplate" id="rhw-S4-nZ8" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<size key="minSize" width="36" height="24"/>
<size key="maxSize" width="36" height="28"/>
<toolbarItem implicitItemIdentifier="5B6FDF6D-9486-49B2-8EA4-184D76D0864C" label="Delete Track" paletteLabel="Delete Track" toolTip="Delete the selected track" image="ToolbarRemoveTemplate" sizingBehavior="auto" id="rhw-S4-nZ8" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<button key="view" verticalHuggingPriority="750" id="e81-Qg-Ncc">
<rect key="frame" x="19" y="14" width="36" height="28"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
@@ -63,9 +59,7 @@
<action selector="deleteTrack:" target="-2" id="N1h-dg-CaR"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="66402BE4-4A7B-4048-A584-2BC0F5E69600" label="Search Metadata" paletteLabel="Search Metadata" toolTip="Search metadata on the web" image="NSRevealFreestandingTemplate" id="uiq-J2-uPs" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<size key="minSize" width="36" height="24"/>
<size key="maxSize" width="36" height="24"/>
<toolbarItem implicitItemIdentifier="66402BE4-4A7B-4048-A584-2BC0F5E69600" label="Search Metadata" paletteLabel="Search Metadata" toolTip="Search metadata on the web" image="NSRevealFreestandingTemplate" sizingBehavior="auto" id="uiq-J2-uPs" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<button key="view" verticalHuggingPriority="750" id="Nes-H1-fbL">
<rect key="frame" x="30" y="14" width="36" height="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
@@ -78,9 +72,7 @@
<action selector="searchMetadata:" target="-2" id="3Jl-xK-nb3"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="C90398D0-2F66-43E9-8B04-6CCD8DDA90D2" label="Search Chapters" paletteLabel="Search Chapters" toolTip="Search chapters on the web" image="ToolbarChaptersTemplate" id="sa2-7a-h2I" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<size key="minSize" width="36" height="24"/>
<size key="maxSize" width="36" height="28"/>
<toolbarItem implicitItemIdentifier="C90398D0-2F66-43E9-8B04-6CCD8DDA90D2" label="Search Chapters" paletteLabel="Search Chapters" toolTip="Search chapters on the web" image="ToolbarChaptersTemplate" sizingBehavior="auto" id="sa2-7a-h2I" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<button key="view" verticalHuggingPriority="750" id="gh7-Et-PwJ">
<rect key="frame" x="30" y="14" width="36" height="28"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
@@ -93,9 +85,7 @@
<action selector="searchChapters:" target="-2" id="0wP-Eq-9mv"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="9F789D5F-C25E-449F-ABCE-DDF99B4FF988" label="Send to Queue" paletteLabel="Send to Queue" toolTip="Send the current document to the queue" image="ToolbarActionTemplate" id="app-IS-8EB" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<size key="minSize" width="36" height="24"/>
<size key="maxSize" width="36" height="28"/>
<toolbarItem implicitItemIdentifier="9F789D5F-C25E-449F-ABCE-DDF99B4FF988" label="Send to Queue" paletteLabel="Send to Queue" toolTip="Send the current document to the queue" image="ToolbarActionTemplate" sizingBehavior="auto" id="app-IS-8EB" customClass="ButtonToolbarItem" customModule="Subler" customModuleProvider="target">
<button key="view" verticalHuggingPriority="750" id="c38-NC-1I2">
<rect key="frame" x="25" y="14" width="36" height="28"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
@@ -108,10 +98,8 @@
<action selector="sendToQueue:" target="-1" id="rIw-6k-8we"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="2E3AB086-491A-436E-A610-14E36AEE8F49" label="Action" paletteLabel="Action" image="NSActionTemplate" id="V6w-Ey-bjV">
<toolbarItem implicitItemIdentifier="2E3AB086-491A-436E-A610-14E36AEE8F49" label="Action" paletteLabel="Action" image="NSActionTemplate" sizingBehavior="auto" id="V6w-Ey-bjV">
<nil key="toolTip"/>
<size key="minSize" width="38" height="24"/>
<size key="maxSize" width="40" height="28"/>
<popUpButton key="view" verticalHuggingPriority="750" id="QuP-nB-KsX">
<rect key="frame" x="2" y="14" width="38" height="28"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
@@ -221,13 +209,13 @@
<connections>
<outlet property="delegate" destination="-2" id="ifJ-VT-BdP"/>
</connections>
<point key="canvasLocation" x="546" y="-768"/>
<point key="canvasLocation" x="297" y="-848"/>
</window>
</objects>
<resources>
<image name="NSActionTemplate" width="17" height="15"/>
<image name="NSAddTemplate" width="15" height="11"/>
<image name="NSRevealFreestandingTemplate" width="15" height="13"/>
<image name="NSActionTemplate" width="15" height="15"/>
<image name="NSAddTemplate" width="14" height="13"/>
<image name="NSRevealFreestandingTemplate" width="15" height="15"/>
<image name="ToolbarActionTemplate" width="24" height="24"/>
<image name="ToolbarChaptersTemplate" width="14" height="13"/>
<image name="ToolbarRemoveTemplate" width="16" height="16"/>
+12 -12
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17140" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17147" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17140"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17147"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -93,7 +93,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="trackEnabled" id="Gfc-fL-316" customClass="CheckBoxCellView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="42" y="1" width="22" height="17"/>
<rect key="frame" x="42" y="1" width="20" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button toolTip="Enable or disable the track" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JD5-tO-uQc">
@@ -128,11 +128,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="trackName" id="9fL-77-imQ">
<rect key="frame" x="66.5" y="1" width="193" height="17"/>
<rect key="frame" x="65" y="1" width="194" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gyX-Aq-rgC">
<rect key="frame" x="0.0" y="0.0" width="193" height="17"/>
<rect key="frame" x="0.0" y="0.0" width="194" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" title="Do not localize" id="3TN-xY-oN3">
<font key="font" metaFont="system"/>
@@ -163,7 +163,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="trackDuration" id="o3M-Vh-HrA">
<rect key="frame" x="263" y="1" width="92" height="17"/>
<rect key="frame" x="261.5" y="1" width="92" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3k9-Ev-UfR">
@@ -195,11 +195,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="trackLanguage" id="iMB-mM-hYa" customClass="PopUpCellView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="358" y="1" width="138" height="17"/>
<rect key="frame" x="356.5" y="1" width="137" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<popUpButton fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Afo-xh-8aB">
<rect key="frame" x="3" y="0.0" width="132" height="18"/>
<rect key="frame" x="3" y="0.0" width="131" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" alignment="right" lineBreakMode="truncatingTail" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" id="WuP-cy-d5d">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -230,11 +230,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="trackInfo" id="gfy-Nm-dJU">
<rect key="frame" x="498.5" y="1" width="150" height="17"/>
<rect key="frame" x="497" y="1" width="151" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aWa-JY-QEe">
<rect key="frame" x="0.0" y="0.0" width="150" height="17"/>
<rect key="frame" x="0.0" y="0.0" width="151" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="right" title="Do not localize" id="3I9-re-Mst">
<font key="font" metaFont="system"/>
@@ -248,11 +248,11 @@
</connections>
</tableCellView>
<tableCellView identifier="DisabledFormatCell" id="Nfv-nQ-DF5">
<rect key="frame" x="498.5" y="20" width="150" height="17"/>
<rect key="frame" x="497" y="20" width="151" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ezM-ed-YTi">
<rect key="frame" x="0.0" y="0.0" width="150" height="17"/>
<rect key="frame" x="0.0" y="0.0" width="151" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="right" title="Do not localize" id="y3u-NN-Et0">
<font key="font" metaFont="system"/>
+12 -11
View File
@@ -164,8 +164,18 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
trackViewController.view.frame = detailsItem.viewController.view.bounds
trackViewController.view.autoresizingMask = [NSView.AutoresizingMask.width, NSView.AutoresizingMask.height]
detailsItem.viewController.view.addSubview(trackViewController.view)
}
self.window?.toolbar?.validateVisibleItems();
func delete(tracks: [MP42Track]) {
if tracks.isEmpty == false {
mp4.removeTracks(tracks)
if Prefs.organizeAlternateGroups { mp4.organizeAlternateGroups() }
if Prefs.inferMediaCharacteristics { mp4.inferMediaCharacteristics() }
doc.updateChangeCount(.changeDone)
tracksViewController.reloadData()
}
}
// MARK: Validation
@@ -266,16 +276,7 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
}
@IBAction func deleteTrack(_ sender: Any) {
let tracks = tracksViewController.selectedTracks
if tracks.isEmpty == false {
mp4.removeTracks(tracks)
if Prefs.organizeAlternateGroups { mp4.organizeAlternateGroups() }
if Prefs.inferMediaCharacteristics { mp4.inferMediaCharacteristics() }
doc.updateChangeCount(.changeDone)
tracksViewController.reloadData()
}
delete(tracks: tracksViewController.selectedTracks)
}
@IBAction func addChaptersEvery(_ sender: NSMenuItem) {
+36 -37
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16085" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17140" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16085"/>
<plugIn identifier="com.apple.imagekit.ibplugin" version="16085"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17140"/>
<plugIn identifier="com.apple.imagekit.ibplugin" version="17140"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -26,19 +26,19 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView misplaced="YES" id="1">
<rect key="frame" x="0.0" y="0.0" width="480" height="162"/>
<rect key="frame" x="0.0" y="0.0" width="480" height="186"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<tabView controlSize="small" translatesAutoresizingMaskIntoConstraints="NO" id="10">
<rect key="frame" x="-11" y="-12" width="502" height="169"/>
<rect key="frame" x="-11" y="-12" width="502" height="170"/>
<tabViewItems>
<tabViewItem label="Metadata" identifier="1" id="11">
<view key="view" id="12">
<rect key="frame" x="10" y="25" width="482" height="131"/>
<rect key="frame" x="10" y="25" width="482" height="132"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<popUpButton toolTip="Add a new metadata item" translatesAutoresizingMaskIntoConstraints="NO" id="30">
<rect key="frame" x="17" y="7" width="32" height="22"/>
<rect key="frame" x="17" y="7" width="35" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="oAx-ac-cJp"/>
</constraints>
@@ -59,7 +59,7 @@
</connections>
</popUpButton>
<button toolTip="Remove selected item" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="53">
<rect key="frame" x="48" y="7" width="24" height="22"/>
<rect key="frame" x="51" y="7" width="24" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="0TW-Pw-B6h"/>
</constraints>
@@ -73,7 +73,7 @@
</connections>
</button>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="179">
<rect key="frame" x="80" y="7" width="33" height="22"/>
<rect key="frame" x="83" y="7" width="33" height="22"/>
<constraints>
<constraint firstAttribute="width" constant="33" id="ZIk-ID-MnW"/>
</constraints>
@@ -82,7 +82,7 @@
<font key="font" metaFont="menu" size="11"/>
<menu key="menu" title="OtherViews" id="181">
<items>
<menuItem image="NSSmartBadgeTemplate" hidden="YES" id="184">
<menuItem image="NSActionTemplate" hidden="YES" id="184">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
</items>
@@ -91,9 +91,9 @@
<accessibility description="Sets"/>
</popUpButton>
<scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="r4i-wT-qDC">
<rect key="frame" x="17" y="36" width="448" height="89"/>
<rect key="frame" x="17" y="36" width="448" height="90"/>
<clipView key="contentView" id="cQT-bX-0YB">
<rect key="frame" x="1" y="0.0" width="446" height="88"/>
<rect key="frame" x="1" y="1" width="446" height="88"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="14" rowSizeStyle="automatic" headerView="qXU-xB-xRF" viewBased="YES" floatsGroupRows="NO" id="qg5-r0-E4V" customClass="ExpandedTableView" customModule="Subler" customModuleProvider="target">
@@ -252,7 +252,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<comboBox verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="1000" translatesAutoresizingMaskIntoConstraints="NO" id="LbC-r6-Pau">
<rect key="frame" x="3" y="0.0" width="318" height="19"/>
<rect key="frame" x="3" y="0.0" width="319" height="19"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<comboBoxCell key="cell" controlSize="small" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" alignment="left" title="Do not localize" usesSingleLineMode="YES" buttonBordered="NO" numberOfVisibleItems="5" id="jkg-xz-Hbn">
<font key="font" metaFont="menu" size="11"/>
@@ -287,7 +287,7 @@
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="qXU-xB-xRF">
<tableHeaderView key="headerView" wantsLayer="YES" id="qXU-xB-xRF">
<rect key="frame" x="0.0" y="0.0" width="446" height="23"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
@@ -312,19 +312,19 @@
</tabViewItem>
<tabViewItem label="Artwork" identifier="Item 1" id="15">
<view key="view" id="16">
<rect key="frame" x="10" y="25" width="482" height="241"/>
<rect key="frame" x="10" y="25" width="482" height="178"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView focusRingType="none" autohidesScrollers="YES" horizontalLineScroll="197" horizontalPageScroll="10" verticalLineScroll="197" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="214">
<rect key="frame" x="17" y="36" width="448" height="199"/>
<scrollView focusRingType="none" autohidesScrollers="YES" horizontalLineScroll="134" horizontalPageScroll="10" verticalLineScroll="134" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="214">
<rect key="frame" x="17" y="36" width="448" height="136"/>
<clipView key="contentView" copiesOnScroll="NO" id="7IP-Gn-Bxd">
<rect key="frame" x="1" y="1" width="446" height="197"/>
<rect key="frame" x="1" y="1" width="446" height="134"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<ikImageBrowserView autoresizesSubviews="NO" zoomValue="1" allowsReordering="YES" animates="YES" translatesAutoresizingMaskIntoConstraints="NO" id="217" customClass="ImageBrowserView" customModule="Subler" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="446" height="197"/>
<rect key="frame" x="0.0" y="0.0" width="446" height="134"/>
<autoresizingMask key="contentResizingMask" heightSizable="YES"/>
<size key="cellSize" width="177" height="177"/>
<size key="cellSize" width="114" height="114"/>
<connections>
<outlet property="_dataSource" destination="-2" id="222"/>
<outlet property="_delegate" destination="-2" id="221"/>
@@ -347,7 +347,7 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="215">
<rect key="frame" x="431" y="1" width="16" height="193"/>
<rect key="frame" x="432" y="1" width="15" height="51"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
@@ -379,9 +379,8 @@
</connections>
</button>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="235">
<rect key="frame" x="350" y="11" width="115" height="15"/>
<rect key="frame" x="349" y="11" width="117" height="15"/>
<constraints>
<constraint firstAttribute="height" constant="13" id="ZuS-Gb-IY3"/>
<constraint firstAttribute="width" constant="115" id="mBx-7u-wTU"/>
</constraints>
<sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" maxValue="2" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="236"/>
@@ -391,9 +390,9 @@
</slider>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="223" secondAttribute="bottom" constant="8" id="2rH-o3-DfM"/>
<constraint firstItem="235" firstAttribute="top" secondItem="214" secondAttribute="bottom" constant="11" id="3GL-7W-Gde"/>
<constraint firstItem="214" firstAttribute="leading" secondItem="16" secondAttribute="leading" constant="17" id="4FA-0p-Olg"/>
<constraint firstItem="226" firstAttribute="centerY" secondItem="223" secondAttribute="centerY" id="5a5-e8-dAP"/>
<constraint firstAttribute="bottom" secondItem="223" secondAttribute="bottom" constant="8" id="BgF-RQ-nc8"/>
<constraint firstItem="226" firstAttribute="centerY" secondItem="235" secondAttribute="centerY" constant="0.5" id="IHP-mq-pja"/>
<constraint firstItem="223" firstAttribute="top" secondItem="214" secondAttribute="bottom" constant="8" symbolic="YES" id="Omx-Vr-JKg"/>
<constraint firstItem="214" firstAttribute="top" secondItem="16" secondAttribute="top" constant="6" id="Pfx-al-MJd"/>
@@ -414,20 +413,20 @@
<constraint firstItem="10" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="-4" id="W2u-1d-KH8"/>
<constraint firstAttribute="bottom" secondItem="10" secondAttribute="bottom" constant="-2" id="gd6-eJ-5fo"/>
</constraints>
<point key="canvasLocation" x="49" y="-5"/>
<point key="canvasLocation" x="49" y="5.5"/>
</customView>
<userDefaultsController representsSharedInstance="YES" id="z7a-RX-pNz"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" visibleAtLaunch="NO" animationBehavior="default" id="ZRj-hi-qeJ" userLabel="Preset Save">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="400" width="436" height="139"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<view key="contentView" id="92i-7C-XJ4">
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
<view key="contentView" misplaced="YES" id="92i-7C-XJ4">
<rect key="frame" x="0.0" y="0.0" width="436" height="139"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VHc-Eh-XSb">
<rect key="frame" x="17" y="101" width="44" height="16"/>
<rect key="frame" x="17" y="103" width="44" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Name:" id="ZqF-j8-NeN">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -435,7 +434,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="866-MG-GR3">
<rect key="frame" x="67" y="98" width="349" height="21"/>
<rect key="frame" x="67" y="100" width="349" height="21"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="QYb-JQ-zG1">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -443,7 +442,7 @@
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1pQ-kd-mLU">
<rect key="frame" x="340" y="13" width="82" height="32"/>
<rect key="frame" x="335" y="13" width="88" height="32"/>
<buttonCell key="cell" type="push" title="Save" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="4p7-7v-cUB">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -456,7 +455,7 @@ DQ
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="b0L-7j-mGd">
<rect key="frame" x="258" y="13" width="82" height="32"/>
<rect key="frame" x="249" y="13" width="88" height="32"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="sNX-Z3-AtD">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@@ -469,14 +468,14 @@ Gw
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="Ild-x7-pnx">
<rect key="frame" x="65" y="73" width="160" height="19"/>
<rect key="frame" x="65" y="75" width="164" height="18"/>
<buttonCell key="cell" type="check" title="Keep existing artworks" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="doa-uZ-CNr">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<button verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="7hc-Ee-1yE">
<rect key="frame" x="65" y="53" width="178" height="18"/>
<rect key="frame" x="65" y="53" width="182" height="18"/>
<buttonCell key="cell" type="check" title="Keep existing annotations" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="aiW-0y-PWH">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -508,8 +507,8 @@ Gw
</window>
</objects>
<resources>
<image name="NSAddTemplate" width="11" height="11"/>
<image name="NSRemoveTemplate" width="11" height="11"/>
<image name="NSSmartBadgeTemplate" width="14" height="14"/>
<image name="NSActionTemplate" width="15" height="15"/>
<image name="NSAddTemplate" width="14" height="13"/>
<image name="NSRemoveTemplate" width="14" height="4"/>
</resources>
</document>
+6 -1
View File
@@ -10,9 +10,10 @@ import MP42Foundation
protocol TracksViewControllerDelegate: AnyObject {
func didSelect(tracks: [MP42Track])
func delete(tracks: [MP42Track])
}
final class TracksViewController: NSViewController, NSTableViewDataSource, NSTableViewDelegate {
final class TracksViewController: NSViewController, NSTableViewDataSource, NSTableViewDelegate, ExpandedTableViewDelegate {
weak var delegate: TracksViewControllerDelegate?
@@ -89,6 +90,10 @@ final class TracksViewController: NSViewController, NSTableViewDataSource, NSTab
}
}
func deleteSelection(in tableview: NSTableView) {
delegate?.delete(tracks: selectedTracks)
}
// MARK: Actions
@IBAction func setTrackEnabled(_ sender: NSButton) {