macOS: Tunnel edit: Rename action handling methods
This commit is contained in:
parent
8530ce1545
commit
4c8c397fac
|
@ -145,10 +145,10 @@ class TunnelEditViewController: NSViewController {
|
||||||
scrollView.documentView = textView
|
scrollView.documentView = textView
|
||||||
|
|
||||||
saveButton.target = self
|
saveButton.target = self
|
||||||
saveButton.action = #selector(saveButtonClicked)
|
saveButton.action = #selector(handleSaveAction)
|
||||||
|
|
||||||
discardButton.target = self
|
discardButton.target = self
|
||||||
discardButton.action = #selector(discardButtonClicked)
|
discardButton.action = #selector(handleDiscardAction)
|
||||||
|
|
||||||
let margin: CGFloat = 20
|
let margin: CGFloat = 20
|
||||||
let internalSpacing: CGFloat = 10
|
let internalSpacing: CGFloat = 10
|
||||||
|
@ -178,7 +178,7 @@ class TunnelEditViewController: NSViewController {
|
||||||
self.view = containerView
|
self.view = containerView
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func saveButtonClicked() {
|
@objc func handleSaveAction() {
|
||||||
let name = nameRow.value
|
let name = nameRow.value
|
||||||
guard !name.isEmpty else {
|
guard !name.isEmpty else {
|
||||||
ErrorPresenter.showErrorAlert(title: tr("macAlertNameIsEmpty"), message: "", from: self)
|
ErrorPresenter.showErrorAlert(title: tr("macAlertNameIsEmpty"), message: "", from: self)
|
||||||
|
@ -237,7 +237,7 @@ class TunnelEditViewController: NSViewController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func discardButtonClicked() {
|
@objc func handleDiscardAction() {
|
||||||
delegate?.tunnelEditingCancelled()
|
delegate?.tunnelEditingCancelled()
|
||||||
dismiss(self)
|
dismiss(self)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue