Fix build.

This commit is contained in:
Damiano Galassi committed 2018-03-30 11:20:13 +02:00
1 parent 420701d2a1
commit 193ed1ff80
2 files changed
+13 -13

No files matched your search

+3 -3
View File
@@ -1,15 +1,15 @@
<?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="13528" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13528"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14109"/>
<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>
<customObject id="-2" userLabel="File's Owner" customClass="FileImportController" customModule="Subler" customModuleProvider="target"> <customObject id="-2" userLabel="File's Owner" customClass="FileImportController" customModule="Subler" customModuleProvider="target">
<connections> <connections>
<outlet property="importMetadataCheckbox" destination="36" id="ctf-Cj-LBY"/> <outlet property="importMetadataCheckbox" destination="36" id="ctf-Cj-LBY"/>
<outlet property="tableView" destination="7" id="fqn-pa-2UI"/> <outlet property="tracksTableView" destination="7" id="fqn-pa-2UI"/>
<outlet property="window" destination="1" id="3"/> <outlet property="window" destination="1" id="3"/>
</connections> </connections>
</customObject> </customObject>
+10 -10
View File
@@ -169,7 +169,7 @@ class FileImportController: NSWindowController, NSTableViewDataSource, NSTableVi
private var importMetadata: Bool private var importMetadata: Bool
private weak var delegate: FileImportControllerDelegate? private weak var delegate: FileImportControllerDelegate?
@IBOutlet var tableView: ExpandedTableView! @IBOutlet var tracksTableView: ExpandedTableView!
@IBOutlet var importMetadataCheckbox: NSButton! @IBOutlet var importMetadataCheckbox: NSButton!
override public var windowNibName: NSNib.Name? { override public var windowNibName: NSNib.Name? {
@@ -229,8 +229,8 @@ class FileImportController: NSWindowController, NSTableViewDataSource, NSTableVi
// MARK: Selection // MARK: Selection
private func reloadCheckColumn(forRowIndexes indexes: IndexSet) { private func reloadCheckColumn(forRowIndexes indexes: IndexSet) {
let columnIndex = tableView.column(withIdentifier: checkColumn) let columnIndex = tracksTableView.column(withIdentifier: checkColumn)
tableView.reloadData(forRowIndexes: indexes, columnIndexes: IndexSet(integer: columnIndex)) tracksTableView.reloadData(forRowIndexes: indexes, columnIndexes: IndexSet(integer: columnIndex))
} }
private func setCheck(value: Bool, forIndexes indexes: IndexSet) { private func setCheck(value: Bool, forIndexes indexes: IndexSet) {
@@ -251,7 +251,7 @@ class FileImportController: NSWindowController, NSTableViewDataSource, NSTableVi
action == #selector(self.checkSelected(_:)) || action == #selector(self.checkSelected(_:)) ||
action == #selector(self.uncheckSelected(_:)) || action == #selector(self.uncheckSelected(_:)) ||
action == #selector(self.checkOnlyTracksWithSameLanguage(_:)) { action == #selector(self.checkOnlyTracksWithSameLanguage(_:)) {
if tableView.selectedRow != -1 || tableView.clickedRow != -1 { if tracksTableView.selectedRow != -1 || tracksTableView.clickedRow != -1 {
return true return true
} }
} }
@@ -259,16 +259,16 @@ class FileImportController: NSWindowController, NSTableViewDataSource, NSTableVi
} }
@IBAction func checkSelected(_ sender: Any) { @IBAction func checkSelected(_ sender: Any) {
setCheck(value: true, forIndexes: tableView.targetedRowIndexes) setCheck(value: true, forIndexes: tracksTableView.targetedRowIndexes)
} }
@IBAction func uncheckSelected(_ sender: Any) { @IBAction func uncheckSelected(_ sender: Any) {
setCheck(value: false, forIndexes: tableView.targetedRowIndexes) setCheck(value: false, forIndexes: tracksTableView.targetedRowIndexes)
} }
@IBAction func checkOnlyTracksWithSameLanguage(_ sender: Any) { @IBAction func checkOnlyTracksWithSameLanguage(_ sender: Any) {
let languages = tableView.targetedRowIndexes.compactMap { let languages = tracksTableView.targetedRowIndexes.compactMap { (index: Int) -> String? in
let item = items[$0] let item = items[index]
switch item { switch item {
case .file(_): case .file(_):
return nil return nil
@@ -367,7 +367,7 @@ class FileImportController: NSWindowController, NSTableViewDataSource, NSTableVi
} }
@IBAction func setCheck(_ sender: NSButton) { @IBAction func setCheck(_ sender: NSButton) {
let row = tableView.row(for: sender) let row = tracksTableView.row(for: sender)
if row == -1 { return } if row == -1 { return }
switch items[row] { switch items[row] {
@@ -379,7 +379,7 @@ class FileImportController: NSWindowController, NSTableViewDataSource, NSTableVi
} }
@IBAction func setActionValue(_ sender: NSPopUpButton) { @IBAction func setActionValue(_ sender: NSPopUpButton) {
let row = tableView.row(for: sender) let row = tracksTableView.row(for: sender)
guard let selectedItem = sender.selectedItem, row > -1 else { return } guard let selectedItem = sender.selectedItem, row > -1 else { return }
switch items[row] { switch items[row] {