summaryrefslogtreecommitdiffstats
path: root/pkg/gui/patch_options_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-05 12:01:59 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-07 10:52:51 +1100
commit91fe68576cde3e4582373b255c5eb97cd3065c71 (patch)
treedce5212c30f0a1b01cc96e7ee10307c80578e7f4 /pkg/gui/patch_options_panel.go
parentbbb5eee23a62162d2695a27f923e1a543852742a (diff)
refactor
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r--pkg/gui/patch_options_panel.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go
index dd29f9d42..841683c06 100644
--- a/pkg/gui/patch_options_panel.go
+++ b/pkg/gui/patch_options_panel.go
@@ -98,7 +98,7 @@ func (gui *Gui) handleDeletePatchFromCommit() error {
return gui.WithWaitingStatus(gui.Tr.RebasingStatus, func() error {
commitIndex := gui.getPatchCommitIndex()
- gui.logSpan(gui.Tr.Spans.RemovePatchFromCommit)
+ gui.logAction(gui.Tr.Actions.RemovePatchFromCommit)
err := gui.GitCommand.DeletePatchesFromCommit(gui.State.Commits, commitIndex, gui.GitCommand.PatchManager)
return gui.handleGenericMergeCommandResult(err)
})
@@ -115,7 +115,7 @@ func (gui *Gui) handleMovePatchToSelectedCommit() error {
return gui.WithWaitingStatus(gui.Tr.RebasingStatus, func() error {
commitIndex := gui.getPatchCommitIndex()
- gui.logSpan(gui.Tr.Spans.MovePatchToSelectedCommit)
+ gui.logAction(gui.Tr.Actions.MovePatchToSelectedCommit)
err := gui.GitCommand.MovePatchToSelectedCommit(gui.State.Commits, commitIndex, gui.State.Panels.Commits.SelectedLineIdx, gui.GitCommand.PatchManager)
return gui.handleGenericMergeCommandResult(err)
})
@@ -133,7 +133,7 @@ func (gui *Gui) handleMovePatchIntoWorkingTree() error {
pull := func(stash bool) error {
return gui.WithWaitingStatus(gui.Tr.RebasingStatus, func() error {
commitIndex := gui.getPatchCommitIndex()
- gui.logSpan(gui.Tr.Spans.MovePatchIntoIndex)
+ gui.logAction(gui.Tr.Actions.MovePatchIntoIndex)
err := gui.GitCommand.MovePatchIntoIndex(gui.State.Commits, commitIndex, gui.GitCommand.PatchManager, stash)
return gui.handleGenericMergeCommandResult(err)
})
@@ -163,7 +163,7 @@ func (gui *Gui) handlePullPatchIntoNewCommit() error {
return gui.WithWaitingStatus(gui.Tr.RebasingStatus, func() error {
commitIndex := gui.getPatchCommitIndex()
- gui.logSpan(gui.Tr.Spans.MovePatchIntoNewCommit)
+ gui.logAction(gui.Tr.Actions.MovePatchIntoNewCommit)
err := gui.GitCommand.PullPatchIntoNewCommit(gui.State.Commits, commitIndex, gui.GitCommand.PatchManager)
return gui.handleGenericMergeCommandResult(err)
})
@@ -174,11 +174,11 @@ func (gui *Gui) handleApplyPatch(reverse bool) error {
return err
}
- span := gui.Tr.Spans.ApplyPatch
+ action := gui.Tr.Actions.ApplyPatch
if reverse {
- span = "Apply patch in reverse"
+ action = "Apply patch in reverse"
}
- gui.logSpan(span)
+ gui.logAction(action)
if err := gui.GitCommand.PatchManager.ApplyPatches(reverse); err != nil {
return gui.surfaceError(err)
}