1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-11 08:30:55 +00:00

Reduce repetition.

This commit is contained in:
Thomas Harte 2023-11-17 09:13:45 -05:00
parent 3f27338b2c
commit f2fdfe86ec

View File

@ -86,15 +86,12 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
// TEMPORARY: remove the Apple IIgs and PC compatible options.
// Neither is yet a fully-working machine.
let appleIIgsTabIndex = machineSelector.indexOfTabViewItem(withIdentifier: "appleiigs")
machineSelector.removeTabViewItem(machineSelector.tabViewItem(at: appleIIgsTabIndex))
// let pcTabIndex = machineSelector.indexOfTabViewItem(withIdentifier: "pc")
// machineSelector.removeTabViewItem(machineSelector.tabViewItem(at: pcTabIndex))
for hidden in ["appleiigs", "pc"] {
let tabIndex = machineSelector.indexOfTabViewItem(withIdentifier: hidden)
machineSelector.removeTabViewItem(machineSelector.tabViewItem(at: tabIndex))
}
machineNameTable.reloadData()
// Machine type
if let machineIdentifier = standardUserDefaults.string(forKey: "new.machine") {
// If I've changed my mind about visible tabs between versions, there may not be one that corresponds