diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-16 14:46:53 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | 1dd7307fde033dae5fececac15810a99e26c3d91 (patch) | |
tree | 4e851c9e3229a6fe3b4191f6311d05d7a9142960 /pkg/gui/git_flow.go | |
parent | a90b6efded49abcfa2516db794d7875b0396f558 (diff) |
start moving commit panel handlers into controller
more
and more
move rebase commit refreshing into existing abstraction
and more
and more
WIP
and more
handling clicks
properly fix merge conflicts
update cheatsheet
lots more preparation to start moving things into controllers
WIP
better typing
expand on remotes controller
moving more code into controllers
Diffstat (limited to 'pkg/gui/git_flow.go')
-rw-r--r-- | pkg/gui/git_flow.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/gui/git_flow.go b/pkg/gui/git_flow.go index ab58adfe8..171310785 100644 --- a/pkg/gui/git_flow.go +++ b/pkg/gui/git_flow.go @@ -13,27 +13,27 @@ func (gui *Gui) handleCreateGitFlowMenu() error { return nil } - if !gui.Git.Flow.GitFlowEnabled() { - return gui.PopupHandler.ErrorMsg("You need to install git-flow and enable it in this repo to use git-flow features") + if !gui.git.Flow.GitFlowEnabled() { + return gui.c.ErrorMsg("You need to install git-flow and enable it in this repo to use git-flow features") } startHandler := func(branchType string) func() error { return func() error { - title := utils.ResolvePlaceholderString(gui.Tr.NewGitFlowBranchPrompt, map[string]string{"branchType": branchType}) + title := utils.ResolvePlaceholderString(gui.c.Tr.NewGitFlowBranchPrompt, map[string]string{"branchType": branchType}) - return gui.PopupHandler.Prompt(popup.PromptOpts{ + return gui.c.Prompt(popup.PromptOpts{ Title: title, HandleConfirm: func(name string) error { - gui.logAction(gui.Tr.Actions.GitFlowStart) + gui.c.LogAction(gui.c.Tr.Actions.GitFlowStart) return gui.runSubprocessWithSuspenseAndRefresh( - gui.Git.Flow.StartCmdObj(branchType, name), + gui.git.Flow.StartCmdObj(branchType, name), ) }, }) } } - return gui.PopupHandler.Menu(popup.CreateMenuOptions{ + return gui.c.Menu(popup.CreateMenuOptions{ Title: "git flow", Items: []*popup.MenuItem{ { @@ -64,11 +64,11 @@ func (gui *Gui) handleCreateGitFlowMenu() error { } func (gui *Gui) gitFlowFinishBranch(branchName string) error { - cmdObj, err := gui.Git.Flow.FinishCmdObj(branchName) + cmdObj, err := gui.git.Flow.FinishCmdObj(branchName) if err != nil { - return gui.PopupHandler.Error(err) + return gui.c.Error(err) } - gui.logAction(gui.Tr.Actions.GitFlowFinish) + gui.c.LogAction(gui.c.Tr.Actions.GitFlowFinish) return gui.runSubprocessWithSuspenseAndRefresh(cmdObj) } |