From 273f572a871b0511dd0d0860045b308db6e2161b Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Tue, 26 Jan 2021 13:09:10 -0600 Subject: The statusbar got lost somewhere along the way. A noisy (debug) log message was left in. --- cmd/gotop/main.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'cmd') diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go index f782191..bcf05f0 100644 --- a/cmd/gotop/main.go +++ b/cmd/gotop/main.go @@ -51,7 +51,6 @@ var ( conf gotop.Config help *w.HelpMenu bar *w.StatusBar - statusbar bool stderrLogger = log.New(os.Stderr, "", 0) tr lingo.Translations ) @@ -176,7 +175,7 @@ func eventLoop(c gotop.Config, grid *layout.MyGrid) { case <-drawTicker: if !c.HelpVisible { ui.Render(grid) - if statusbar { + if c.Statusbar { ui.Render(bar) } } @@ -193,7 +192,7 @@ func eventLoop(c gotop.Config, grid *layout.MyGrid) { case "": payload := e.Payload.(ui.Resize) termWidth, termHeight := payload.Width, payload.Height - if statusbar { + if c.Statusbar { grid.SetRect(0, 0, termWidth, termHeight-1) bar.SetRect(0, termHeight-1, termWidth, termHeight) } else { @@ -238,7 +237,7 @@ func eventLoop(c gotop.Config, grid *layout.MyGrid) { } case "": ui.Render(grid) - if statusbar { + if c.Statusbar { ui.Render(bar) } case "": @@ -433,7 +432,7 @@ func run() int { setDefaultTermuiColors(conf) // done before initializing widgets to allow inheriting colors help = w.NewHelpMenu(tr) - if statusbar { + if conf.Statusbar { bar = w.NewStatusBar() } @@ -444,7 +443,7 @@ func run() int { } termWidth, termHeight := ui.TerminalDimensions() - if statusbar { + if conf.Statusbar { grid.SetRect(0, 0, termWidth, termHeight-1) } else { grid.SetRect(0, 0, termWidth, termHeight) @@ -452,7 +451,7 @@ func run() int { help.Resize(termWidth, termHeight) ui.Render(grid) - if statusbar { + if conf.Statusbar { bar.SetRect(0, termHeight-1, termWidth, termHeight) ui.Render(bar) } -- cgit v1.2.3