diff options
author | Moritz Haase <Moritz.Haase@bmw.de> | 2022-03-30 08:48:29 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-30 20:13:43 +1100 |
commit | 8fb2acc2244ae0364fa20288bfcf70deed3ae974 (patch) | |
tree | 02c132565c7b87bf54f895fbc0d815efce867cd1 /pkg/gui/controllers/branches_controller.go | |
parent | f2fb6453a13d7e609bb8456843e208e8e3e7901a (diff) |
pkg/gui: Rename IPopupHandler::Ask() to Confirm()
Follow the JavaScript naming scheme for user interaction (alert, prompt,
confirm) as discussed in #1832.
Diffstat (limited to 'pkg/gui/controllers/branches_controller.go')
-rw-r--r-- | pkg/gui/controllers/branches_controller.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/controllers/branches_controller.go b/pkg/gui/controllers/branches_controller.go index c578a405b..2caa30525 100644 --- a/pkg/gui/controllers/branches_controller.go +++ b/pkg/gui/controllers/branches_controller.go @@ -155,7 +155,7 @@ func (self *BranchesController) forceCheckout() error { message := self.c.Tr.SureForceCheckout title := self.c.Tr.ForceCheckoutBranch - return self.c.Ask(types.AskOpts{ + return self.c.Confirm(types.ConfirmOpts{ Title: title, Prompt: message, HandleConfirm: func() error { @@ -176,7 +176,7 @@ func (self *BranchesController) checkoutByName() error { self.c.LogAction("Checkout branch") return self.helpers.Refs.CheckoutRef(response, types.CheckoutRefOptions{ OnRefNotFound: func(ref string) error { - return self.c.Ask(types.AskOpts{ + return self.c.Confirm(types.ConfirmOpts{ Title: self.c.Tr.BranchNotFoundTitle, Prompt: fmt.Sprintf("%s %s%s", self.c.Tr.BranchNotFoundPrompt, ref, "?"), HandleConfirm: func() error { @@ -227,7 +227,7 @@ func (self *BranchesController) deleteWithForce(selectedBranch *models.Branch, f }, ) - return self.c.Ask(types.AskOpts{ + return self.c.Confirm(types.ConfirmOpts{ Title: title, Prompt: message, HandleConfirm: func() error { @@ -344,7 +344,7 @@ func (self *BranchesController) rename(branch *models.Branch) error { return promptForNewName() } - return self.c.Ask(types.AskOpts{ + return self.c.Confirm(types.ConfirmOpts{ Title: self.c.Tr.LcRenameBranch, Prompt: self.c.Tr.RenameBranchWarning, HandleConfirm: promptForNewName, |