summaryrefslogtreecommitdiffstats
path: root/pkg/gui/patch_options_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-29 19:09:20 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit138be04e6575f2bd087630e49d122af578c78bf6 (patch)
treeed038641d6871e49ff426096f300e6b3b3ab4f1e /pkg/gui/patch_options_panel.go
parent1a74ed32143f826104e1d60f4392d2d8ba53cd80 (diff)
refactor contexts code
Diffstat (limited to 'pkg/gui/patch_options_panel.go')
-rw-r--r--pkg/gui/patch_options_panel.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/pkg/gui/patch_options_panel.go b/pkg/gui/patch_options_panel.go
index 5c321819a..8f8615e4a 100644
--- a/pkg/gui/patch_options_panel.go
+++ b/pkg/gui/patch_options_panel.go
@@ -4,7 +4,6 @@ import (
"fmt"
"github.com/jesseduffield/lazygit/pkg/commands/types/enums"
- "github.com/jesseduffield/lazygit/pkg/gui/popup"
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
@@ -13,7 +12,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
return gui.c.ErrorMsg(gui.c.Tr.NoPatchError)
}
- menuItems := []*popup.MenuItem{
+ menuItems := []*types.MenuItem{
{
DisplayString: "reset patch",
OnPress: gui.handleResetPatch,
@@ -29,7 +28,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
}
if gui.git.Patch.PatchManager.CanRebase && gui.git.Status.WorkingTreeState() == enums.REBASE_MODE_NONE {
- menuItems = append(menuItems, []*popup.MenuItem{
+ menuItems = append(menuItems, []*types.MenuItem{
{
DisplayString: fmt.Sprintf("remove patch from original commit (%s)", gui.git.Patch.PatchManager.To),
OnPress: gui.handleDeletePatchFromCommit,
@@ -51,7 +50,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
menuItems = append(
menuItems[:1],
append(
- []*popup.MenuItem{
+ []*types.MenuItem{
{
DisplayString: fmt.Sprintf("move patch to selected commit (%s)", selectedCommit.Sha),
OnPress: gui.handleMovePatchToSelectedCommit,
@@ -63,7 +62,7 @@ func (gui *Gui) handleCreatePatchOptionsMenu() error {
}
}
- return gui.c.Menu(popup.CreateMenuOptions{Title: gui.c.Tr.PatchOptionsTitle, Items: menuItems})
+ return gui.c.Menu(types.CreateMenuOptions{Title: gui.c.Tr.PatchOptionsTitle, Items: menuItems})
}
func (gui *Gui) getPatchCommitIndex() int {
@@ -142,7 +141,7 @@ func (gui *Gui) handleMovePatchIntoWorkingTree() error {
}
if gui.workingTreeHelper.IsWorkingTreeDirty() {
- return gui.c.Ask(popup.AskOpts{
+ return gui.c.Ask(types.AskOpts{
Title: gui.c.Tr.MustStashTitle,
Prompt: gui.c.Tr.MustStashWarning,
HandleConfirm: func() error {