diff options
| author | Jeff Carr <[email protected]> | 2024-01-21 11:37:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-21 11:37:00 -0600 |
| commit | ba70be3064c1d082eb0e9146562b7f07dd894fb0 (patch) | |
| tree | f8fc37331297233379614238bc382bf0a4235313 /action.go | |
| parent | dfb7a47e8cccd82080de3d6ba97855eeb2be6593 (diff) | |
cleaner logging outputv0.12.20
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'action.go')
| -rw-r--r-- | action.go | 26 |
1 files changed, 5 insertions, 21 deletions
@@ -43,31 +43,17 @@ func (n *Node) WindowVisable() bool { func sendAction(n *Node, atype widget.ActionType) { if n == nil { log.Error(errors.New("Sending Action on n = nil")) - log.Warn("Sending Action on n = nil") return } n.mu.Lock() defer n.mu.Unlock() - // log.Warn("SENDING ACTION STRINGS n.Strings", n.strings, n.id, n.WidgetType, n.GetProgName()) - - // if the widget is hidden, don't send actions to the plugin - /* - if n.hidden { - if atype == widget.Hide { - // well, unless this is a Hide action, then inform the toolkit - log.Warn("SENDING HIDDEN ACTION. IS THIS A WINDOW?", n.GetProgName(), atype) - } else { - log.Warn("NOT SENDING HIDDEN ACTION", n.GetProgName(), atype) - // return - } - } - */ + // log.Log(PLUG, "SENDING ACTION STRINGS n.Strings", n.strings, n.id, n.WidgetType, n.GetProgName()) // this checks to see if the window is show in the toolkit. If it is not, // then don't send any events. Unless it is a window widget, then send events if n.WidgetType != widget.Window { if !n.WindowVisable() { - log.Warn("NOT SENDING ACTION. Window is not visable", n.id, n.WidgetType, n.GetProgName()) + log.Log(INFO, "Not sending action to widget. Window is not visable", n.id, n.WidgetType, n.GetProgName()) return } } @@ -93,8 +79,6 @@ func sendAction(n *Node, atype widget.ActionType) { for s, _ := range n.strings { a.State.Strings = append(a.State.Strings, s) } - // log.Warn("SENDING ACTION STRINGS a.Strings", a.Strings) - // log.Warn("SENDING ACTION a.State.Value", a.State.Value) a.State.Range.Low = n.X a.State.Range.High = n.Y @@ -119,11 +103,11 @@ func sendAction(n *Node, atype widget.ActionType) { // sends the action/event to each toolkit via a golang plugin channel func sendActionToPlugin(a *widget.Action) { for _, aplug := range allPlugins { - log.Warn("send to toolkit =", aplug.name, "Action type=", a.ActionType, a.WidgetId) + log.Log(PLUG, "send to toolkit =", aplug.name, "Action type=", a.ActionType, a.WidgetId) if aplug.pluginChan == nil { - log.Warn("Action() retrieving the aplug.PluginChannel()", aplug.name) + log.Log(PLUG, "Action() retrieving the aplug.PluginChannel()", aplug.name) aplug.pluginChan = aplug.PluginChannel() - log.Warn("Action() retrieved", aplug.pluginChan) + log.Log(PLUG, "Action() retrieved", aplug.pluginChan) } log.Verbose("Action() SEND to pluginChan", aplug.name, a.ActionType, a.WidgetType, a.WidgetId, a.ProgName) aplug.pluginChan <- *a |
