1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Remove the need for every module to define a widget.Refresh keyboard control

This commit is contained in:
Chris Cummer
2019-08-23 21:18:30 -07:00
parent 5337656c58
commit 523a0bec2c
24 changed files with 28 additions and 45 deletions

View File

@@ -3,9 +3,8 @@ package gitlab
import "github.com/gdamore/tcell"
func (widget *Widget) initializeKeyboardControls() {
widget.InitializeCommonControls()
widget.InitializeCommonControls(widget.Refresh)
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
widget.SetKeyboardChar("h", widget.PrevSource, "Select previous project")
widget.SetKeyboardChar("l", widget.NextSource, "Select next project")