diff options
| -rw-r--r-- | debug.go | 5 | ||||
| -rw-r--r-- | eventBindings.go | 11 | ||||
| -rw-r--r-- | eventMouse.go | 3 | ||||
| -rw-r--r-- | find.go | 2 | ||||
| -rw-r--r-- | init.go | 1 | ||||
| -rw-r--r-- | structs.go | 2 | ||||
| -rw-r--r-- | treeAdd.go | 2 | ||||
| -rw-r--r-- | treeDraw.go | 8 | ||||
| -rw-r--r-- | view.go | 2 |
9 files changed, 19 insertions, 17 deletions
@@ -16,14 +16,15 @@ func (w *guiWidget) dumpTree(s string) { log.Log(ERROR, "dump w.TK == nil", w.node.WidgetId, w.WidgetType, w.String()) return } - w.showWidgetPlacement("dumpTree() " + s) + w.dumpWidget("dumpTree() " + s) for _, child := range w.children { child.dumpTree(s) } } -func (w *guiWidget) showWidgetPlacement(s string) { +// a standard function to print out information about a widget +func (w *guiWidget) dumpWidget(s string) { var s1 string var pId int if w.node.Parent == nil { diff --git a/eventBindings.go b/eventBindings.go index 7bc5baf..b093718 100644 --- a/eventBindings.go +++ b/eventBindings.go @@ -164,17 +164,18 @@ func theLetterD(g *gocui.Gui, v *gocui.View) error { } func theHelp(g *gocui.Gui, v *gocui.View) error { - if showHelp { + if me.showHelp { helplayout() - showHelp = false + me.showHelp = false if me.dropdownV == nil { + log.Info("FIXME: MADE me.dropdownV AGAIN") me.dropdownV = makeDropdownView("addWidget() ddview") } - me.dropdownV.Show() + // me.dropdownV.Show() } else { me.baseGui.DeleteView("help") - showHelp = true - me.dropdownV.Hide() + me.showHelp = true + // me.dropdownV.Hide() } return nil } diff --git a/eventMouse.go b/eventMouse.go index 3a5e0a6..22d153c 100644 --- a/eventMouse.go +++ b/eventMouse.go @@ -35,7 +35,8 @@ func mouseMove(g *gocui.Gui) { if me.supermouse { for _, tk := range findByXY(w, h) { - log.Log(GOCUI, fmt.Sprintf("findByXY() mouseMove() %s wId=%d cuiName=%s at (%d,%d)", tk.WidgetType, tk.node.WidgetId, tk.cuiName, w, h)) + tk.dumpWidget("findByXY()") + // log.Log(GOCUI, fmt.Sprintf("findByXY() mouseMove() %s wId=%d cuiName=%s at (%d,%d)", tk.WidgetType, tk.node.WidgetId, tk.cuiName, w, h)) } } @@ -85,7 +85,7 @@ func findUnderMouse() *guiWidget { if w.WidgetType == widget.Checkbox { return w } - w.showWidgetPlacement("findUnderMouse() found something unknown") + w.dumpWidget("findUnderMouse() found something unknown") found = w } // maybe something else was found @@ -1,4 +1,3 @@ -//gjcarro:pjcarrlugin // Copyright 2017-2025 WIT.COM Inc. All rights reserved. // Use of this source code is governed by the GPL 3.0 @@ -29,7 +29,6 @@ import ( var me config var showDebug bool = true -var showHelp bool = true var redoWidgets bool = true // This is the window that is currently active @@ -100,6 +99,7 @@ type config struct { writeMutex sync.Mutex // TODO: writeMutex protects locks the write process fakefile *FakeFile // JUNK? used to attempt to write to the stdout window dtoggle bool // is a dropdown or combobox currently active? + showHelp bool // toggle boolean for the help menu (deprecate?) // debugging things ecount int // counts how many mouse and keyboard events have occurred @@ -93,5 +93,5 @@ func addWidget(n *tree.Node) { } */ } - nw.showWidgetPlacement("addWidget()") + nw.dumpWidget("in addWidget()") } diff --git a/treeDraw.go b/treeDraw.go index 5fa991c..1177c97 100644 --- a/treeDraw.go +++ b/treeDraw.go @@ -18,7 +18,7 @@ func (w *guiWidget) DrawAt(offsetW, offsetH int) { w.setColor(&colorActiveW) w.placeWidgets(offsetW, offsetH) // compute the sizes & places for each widget w.active = false - w.showWidgets() + w.dumpWidget("DrawAt()") } func (w *guiWidget) toggleTree() { @@ -36,7 +36,7 @@ func (w *guiWidget) drawTree(draw bool) { if w == nil { return } - w.showWidgetPlacement("drawTree()") + w.dumpWidget("in drawTree()") if draw { // w.textResize() w.Show() @@ -77,12 +77,12 @@ func (w *guiWidget) drawView() { w.v, err = me.baseGui.SetView(w.cuiName, a, b, c, d, 0) if err == nil { - w.showWidgetPlacement("drawView()") + w.dumpWidget("drawView() err") log.Log(ERROR, "drawView() internal plugin error err = nil") return } if !errors.Is(err, gocui.ErrUnknownView) { - w.showWidgetPlacement("drawView()") + w.dumpWidget("drawView() err") log.Log(ERROR, "drawView() internal plugin error error.IS()", err) return } @@ -91,7 +91,7 @@ func (w *guiWidget) hideFake() { func (w *guiWidget) showFake() { if w.isFake { w.drawView() - w.showWidgetPlacement("showFake:") + w.dumpWidget("in showFake()") } for _, child := range w.children { child.showFake() |
