diff options
author | Luke Adams <lukeclydeadams@gmail.com> | 2018-10-04 13:21:27 -0600 |
---|---|---|
committer | Luke Adams <lukeclydeadams@gmail.com> | 2018-10-04 13:51:00 -0600 |
commit | e8173d466304e3abc86cec527f062e3709f375dd (patch) | |
tree | 2f4ee58fec4d2693d000c41fddff8b136cc68c3a /termui/termui.go | |
parent | 43db2c77348016d9bc05c713765b2b58534c7c39 (diff) | |
download | git-bug-e8173d466304e3abc86cec527f062e3709f375dd.tar.gz |
Add labelSelect view for choosing labels
Diffstat (limited to 'termui/termui.go')
-rw-r--r-- | termui/termui.go | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/termui/termui.go b/termui/termui.go index 5c39869b..9f68efcc 100644 --- a/termui/termui.go +++ b/termui/termui.go @@ -18,10 +18,11 @@ type termUI struct { activeWindow window - bugTable *bugTable - showBug *showBug - msgPopup *msgPopup - inputPopup *inputPopup + bugTable *bugTable + showBug *showBug + labelSelect *labelSelect + msgPopup *msgPopup + inputPopup *inputPopup } func (tui *termUI) activateWindow(window window) error { @@ -45,12 +46,13 @@ type window interface { // Run will launch the termUI in the terminal func Run(cache *cache.RepoCache) error { ui = &termUI{ - gError: make(chan error, 1), - cache: cache, - bugTable: newBugTable(cache), - showBug: newShowBug(cache), - msgPopup: newMsgPopup(), - inputPopup: newInputPopup(), + gError: make(chan error, 1), + cache: cache, + bugTable: newBugTable(cache), + showBug: newShowBug(cache), + labelSelect: newLabelSelect(), + msgPopup: newMsgPopup(), + inputPopup: newInputPopup(), } ui.activeWindow = ui.bugTable @@ -143,6 +145,10 @@ func keybindings(g *gocui.Gui) error { return err } + if err := ui.labelSelect.keybindings(g); err != nil { + return err + } + if err := ui.msgPopup.keybindings(g); err != nil { return err } |