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/command_log_panel.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/command_log_panel.go')
-rw-r--r-- | pkg/gui/command_log_panel.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/gui/command_log_panel.go b/pkg/gui/command_log_panel.go index aa46a4d18..409fa0023 100644 --- a/pkg/gui/command_log_panel.go +++ b/pkg/gui/command_log_panel.go @@ -22,7 +22,7 @@ import ( // So we call logAction to log the 'Stage File' part and then we call logCommand to log the command itself. // We pass logCommand to our OSCommand struct so that it can handle logging commands // for us. -func (gui *Gui) logAction(action string) { +func (gui *Gui) LogAction(action string) { if gui.Views.Extras == nil { return } @@ -32,7 +32,7 @@ func (gui *Gui) logAction(action string) { fmt.Fprint(gui.Views.Extras, "\n"+style.FgYellow.Sprint(action)) } -func (gui *Gui) logCommand(cmdStr string, commandLine bool) { +func (gui *Gui) LogCommand(cmdStr string, commandLine bool) { if gui.Views.Extras == nil { return } @@ -52,23 +52,23 @@ func (gui *Gui) logCommand(cmdStr string, commandLine bool) { func (gui *Gui) printCommandLogHeader() { introStr := fmt.Sprintf( - gui.Tr.CommandLogHeader, - gui.getKeyDisplay(gui.UserConfig.Keybinding.Universal.ExtrasMenu), + gui.c.Tr.CommandLogHeader, + gui.getKeyDisplay(gui.c.UserConfig.Keybinding.Universal.ExtrasMenu), ) fmt.Fprintln(gui.Views.Extras, style.FgCyan.Sprint(introStr)) - if gui.UserConfig.Gui.ShowRandomTip { + if gui.c.UserConfig.Gui.ShowRandomTip { fmt.Fprintf( gui.Views.Extras, "%s: %s", - style.FgYellow.Sprint(gui.Tr.RandomTip), + style.FgYellow.Sprint(gui.c.Tr.RandomTip), style.FgGreen.Sprint(gui.getRandomTip()), ) } } func (gui *Gui) getRandomTip() string { - config := gui.UserConfig.Keybinding + config := gui.c.UserConfig.Keybinding formattedKey := func(key string) string { return gui.getKeyDisplay(key) |