diff options
| author | Jeff Carr <[email protected]> | 2025-02-09 14:35:11 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-09 14:35:11 -0600 |
| commit | 6ea6ffaa3df04158ebb0df152aa9524653f903d4 (patch) | |
| tree | fc38c1a3505afac77faeb59660a8dff46ae5938e | |
| parent | 7d793c68db2c541c54d06ffa6b0e32ba921308cf (diff) | |
disable the whole screen while things are waitingv0.22.21
| -rw-r--r-- | plugin.go | 9 | ||||
| -rw-r--r-- | treeWidget.go | 12 |
2 files changed, 13 insertions, 8 deletions
@@ -229,7 +229,9 @@ func (tk *guiWidget) Disable() { // log.Info("disable widget in gocui", tk.node.WidgetType, tk.node.ProgName()) switch tk.node.WidgetType { case widget.Box: - log.Info("todo: blank out the window here") + tk.labelN = "Running..." + // log.Info("todo: blank out the window here", tk.String()) + tk.showTextbox() return case widget.Button: tk.setColorDisable() @@ -249,7 +251,10 @@ func (tk *guiWidget) Enable() { // log.Info("enable widget in gocui", tk.node.WidgetType, tk.node.ProgName()) switch tk.node.WidgetType { case widget.Box: - // log.Info("todo: blank out the window here") + // log.Info("todo: un blank the window here") + me.textbox.tk.Hide() + me.textbox.active = false + // log.Info("escaped from textbox") return case widget.Button: tk.restoreEnableColor() diff --git a/treeWidget.go b/treeWidget.go index 2c3f5b2..4d92abd 100644 --- a/treeWidget.go +++ b/treeWidget.go @@ -75,24 +75,24 @@ func (w *guiWidget) deleteView() { } func (tk *guiWidget) String() string { - curval := strings.TrimSpace(tk.node.GetLabel()) + // deprecate this? + curval := strings.TrimSpace(tk.labelN) if curval != "" { return curval } - curval = tk.GetText() + curval = strings.TrimSpace(tk.node.GetLabel()) if curval != "" { return curval } - curval = tk.node.String() + curval = tk.GetText() if curval != "" { return curval } - curval = strings.TrimSpace(tk.node.ProgName()) + curval = tk.node.String() if curval != "" { return curval } - // deprecate this? - curval = strings.TrimSpace(tk.labelN) + curval = strings.TrimSpace(tk.node.ProgName()) if curval != "" { return curval } |
