aboutsummaryrefslogtreecommitdiffstats
path: root/termui/termui.go
diff options
context:
space:
mode:
authorLuke Adams <lukeclydeadams@gmail.com>2018-10-04 13:21:27 -0600
committerLuke Adams <lukeclydeadams@gmail.com>2018-10-04 13:51:00 -0600
commite8173d466304e3abc86cec527f062e3709f375dd (patch)
tree2f4ee58fec4d2693d000c41fddff8b136cc68c3a /termui/termui.go
parent43db2c77348016d9bc05c713765b2b58534c7c39 (diff)
downloadgit-bug-e8173d466304e3abc86cec527f062e3709f375dd.tar.gz
Add labelSelect view for choosing labels
Diffstat (limited to 'termui/termui.go')
-rw-r--r--termui/termui.go26
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
}