1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-15 14:27:29 +00:00

Merge pull request #875 from TomHarte/InitialSelection

Ensures machine selection carries over sessions.
This commit is contained in:
Thomas Harte
2021-03-06 21:38:41 -05:00
committed by GitHub

View File

@@ -56,6 +56,10 @@ class MachinePicker: NSObject {
func establishStoredOptions() { func establishStoredOptions() {
let standardUserDefaults = UserDefaults.standard let standardUserDefaults = UserDefaults.standard
// TEMPORARY: remove the Apple IIgs option. It's not yet a fully-working machine; no need to publicise it.
let appleIIgsTabIndex = machineSelectionTabs.indexOfTabViewItem(withIdentifier: "appleiigs")
machineSelectionTabs.removeTabViewItem(machineSelectionTabs.tabViewItem(at: appleIIgsTabIndex))
// Machine type // Machine type
if let machineIdentifier = standardUserDefaults.string(forKey: "new.machine") { 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 // If I've changed my mind about visible tabs between versions, there may not be one that corresponds
@@ -105,10 +109,6 @@ class MachinePicker: NSObject {
// ZX81 // ZX81
zx81MemorySizeButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.zx81MemorySize")) zx81MemorySizeButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.zx81MemorySize"))
// TEMPORARY: remove the Apple IIgs option. It's not yet a fully-working machine; no need to publicise it.
let appleIIgsTabIndex = machineSelectionTabs.indexOfTabViewItem(withIdentifier: "appleiigs")
machineSelectionTabs.removeTabViewItem(machineSelectionTabs.tabViewItem(at: appleIIgsTabIndex))
} }
fileprivate func storeOptions() { fileprivate func storeOptions() {