Skip to content

Commit

Permalink
Update Bump SwiftBeanCountImporter to 0.9.0
Browse files Browse the repository at this point in the history
Adjust App for changed delegate, add choice input option
  • Loading branch information
Nef10 committed Nov 10, 2024
1 parent a36ee07 commit a3b697d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion SwiftBeanCountImporterApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@
repositoryURL = "https://github.com/Nef10/SwiftBeanCountImporter.git";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 0.8.1;
minimumVersion = 0.9.0;
};
};
F9C329FC2488D1770055EB90 /* XCRemoteSwiftPackageReference "SwiftBeanCountModel" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/yaslab/CSV.swift.git",
"state" : {
"revision" : "5be4d8e0d9cc8aa22d9eb12ac76bc429105d7a4c",
"version" : "2.5.0"
"revision" : "b4371dc833ba22ab6ead90fb63d267c3cf9ce773",
"version" : "2.5.2"
}
},
{
Expand Down Expand Up @@ -87,8 +87,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Nef10/RogersBankDownloader.git",
"state" : {
"revision" : "919c9bdbd09c03c8c904b11943cbae7817b5904c",
"version" : "0.1.0"
"revision" : "c0b2f07fe6bbcd68b8956e4713a87533597aae0e",
"version" : "0.2.1"
}
},
{
Expand All @@ -105,8 +105,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Nef10/SwiftBeanCountImporter.git",
"state" : {
"revision" : "733a1733a7a06684bc7c8b2b95c6116ddbb55f0a",
"version" : "0.8.1"
"revision" : "17a23cc270bc89cdc10088aca669dc51bd190021",
"version" : "0.9.0"
}
},
{
Expand Down Expand Up @@ -141,8 +141,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Nef10/SwiftBeanCountRogersBankMapper.git",
"state" : {
"revision" : "9b76aa24f7696324bcb569ff167dd92f4932d01b",
"version" : "0.0.11"
"revision" : "2a77c3430d2f69ff9d76e953f4b000f9e7abd2f1",
"version" : "0.0.13"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class ImporterInputViewController: NSViewController {
guard let importName, let name else {
fatalError("importName and name are required to create an AccountSelectionViewController")
}
label.stringValue = "\(type == .bool ? "" : "Please enter ")\(name) for the following import: \(importName)"
let verb = if case .choice = type { "select" } else { "enter" }
label.stringValue = "\(type == .bool ? "" : "Please \(verb) ")\(name) for the following import: \(importName)"
switch type {
case .text(let suggestions):
secureTextField.isHidden = true
Expand All @@ -59,6 +60,7 @@ class ImporterInputViewController: NSViewController {
textField.isHidden = true
comboBox.removeAllItems()
comboBox.addItems(withObjectValues: suggestions)
comboBox.isEditable = true
}
case .secret:
comboBox.isHidden = true
Expand All @@ -79,6 +81,15 @@ class ImporterInputViewController: NSViewController {
secureTextField.isHidden = true
okButton.title = "Yes"
cancelButton.title = "No"
case .choice(let options):
secureTextField.isHidden = true
okButton.title = "Ok"
cancelButton.title = "Cancel"
comboBox.isHidden = false
textField.isHidden = true
comboBox.removeAllItems()
comboBox.addItems(withObjectValues: options)
comboBox.isEditable = false
case .none:
fatalError("No type configured in ImporterInputViewController")
}
Expand All @@ -99,6 +110,8 @@ class ImporterInputViewController: NSViewController {
input = textField.stringValue
case .bool:
input = "true"
case .choice:
input = comboBox.stringValue
case .none:
fatalError("No type configured in ImporterInputViewController")
}
Expand Down

0 comments on commit a3b697d

Please sign in to comment.