summaryrefslogtreecommitdiff
path: root/gocui/showStdout.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-17 23:39:03 -0600
committerJeff Carr <[email protected]>2024-01-17 23:39:03 -0600
commita0baba0821441d9cf38f0b33fe12fb96925c6236 (patch)
tree2aece2a890c66c36b08524e117753817078ee58c /gocui/showStdout.go
parentbee272651ad38453aef27f098513f7be652c39bf (diff)
new paths
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gocui/showStdout.go')
-rw-r--r--gocui/showStdout.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/gocui/showStdout.go b/gocui/showStdout.go
index 06d5dbb..c628f4a 100644
--- a/gocui/showStdout.go
+++ b/gocui/showStdout.go
@@ -6,8 +6,8 @@ import (
"github.com/awesome-gocui/gocui"
+ "go.wit.com/lib/widget"
"go.wit.com/log"
- "go.wit.com/gui/widget"
)
var outputW int = 180
@@ -18,7 +18,7 @@ func moveMsg(g *gocui.Gui) {
if !movingMsg && (mx != initialMouseX || my != initialMouseY) {
movingMsg = true
}
- g.SetView("msg", mx-xOffset, my-yOffset, mx-xOffset+outputW, my-yOffset+outputH + me.FramePadH, 0)
+ g.SetView("msg", mx-xOffset, my-yOffset, mx-xOffset+outputW, my-yOffset+outputH+me.FramePadH, 0)
g.SetViewOnBottom("msg")
}
@@ -43,12 +43,12 @@ func showMsg(g *gocui.Gui, v *gocui.View) error {
func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
maxX, maxY := g.Size()
- if (me.rootNode == nil) {
+ if me.rootNode == nil {
// keep skipping this until the binary tree is initialized
return nil
}
- if (me.logStdout == nil) {
+ if me.logStdout == nil {
a := new(widget.Action)
a.ProgName = "stdout"
a.WidgetType = widget.Stdout
@@ -57,12 +57,12 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
n := addNode(a)
me.logStdout = n
me.logStdout.tk.gocuiSize.w0 = maxX - 32
- me.logStdout.tk.gocuiSize.h0 = maxY/2
+ me.logStdout.tk.gocuiSize.h0 = maxY / 2
me.logStdout.tk.gocuiSize.w1 = me.logStdout.tk.gocuiSize.w0 + outputW
me.logStdout.tk.gocuiSize.h1 = me.logStdout.tk.gocuiSize.h0 + outputH
}
v, err := g.View("msg")
- if (v == nil) {
+ if v == nil {
log.Log(NOW, "makeoutputwindow() this is supposed to happen. v == nil", err)
} else {
log.Log(NOW, "makeoutputwindow() msg != nil. WTF now? err =", err)
@@ -76,12 +76,12 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
log.Log(NOW, "makeoutputwindow() this is supposed to happen?", err)
}
- if (err != nil) {
+ if err != nil {
log.Log(NOW, "makeoutputwindow() create output window failed", err)
return nil
}
- if (v == nil) {
+ if v == nil {
log.Log(NOW, "makeoutputwindow() msg == nil. WTF now? err =", err)
return nil
} else {
@@ -91,7 +91,7 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
v.Clear()
v.SelBgColor = gocui.ColorCyan
v.SelFgColor = gocui.ColorBlack
- fmt.Fprintln(v, "figure out how to capture STDOUT to here\n" + stringFromMouseClick)
+ fmt.Fprintln(v, "figure out how to capture STDOUT to here\n"+stringFromMouseClick)
g.SetViewOnBottom("msg")
// g.SetViewOnBottom(v.Name())
return v