summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-02 13:03:44 -0600
committerJeff Carr <[email protected]>2025-02-02 14:52:31 -0600
commit676b3a8548debe6ed3ec2898d29df7c9acd07d62 (patch)
tree5d5bc5764b521dce945147396894583f5a914aab /init.go
parentf2a296064e6befbce4b584f24d474a8ade2c5215 (diff)
tinkering
Diffstat (limited to 'init.go')
-rw-r--r--init.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/init.go b/init.go
index 3ea2372..f87bbb5 100644
--- a/init.go
+++ b/init.go
@@ -1,7 +1,10 @@
+// Although most code from WIT.COM Inc is under the GPL
+// This code is more generic because it must be able
+// to be used in any GUI plugin
+
package tree
import (
- "errors"
"os"
"runtime/debug"
"sync"
@@ -80,8 +83,8 @@ func (me *TreeInfo) newAction(a widget.Action) {
func (me *TreeInfo) catchActionChannel() {
defer func() {
if r := recover(); r != nil {
- log.Log(TREEWARN, "YAHOOOO Recovered in tree.catchActionChannel()", r)
- log.Log(TREEWARN, "YAHOOOO Recovered in tree.catchActionChannel() Plugin:", me.PluginName)
+ log.Log(TREEWARN, "YAHOOOO. Recovered in tree.catchActionChannel()", r)
+ log.Log(TREEWARN, "YAHOOOO. Recovered in tree.catchActionChannel() Plugin:", me.PluginName)
me.SendToolkitPanic()
debug.PrintStack()
me.ToolkitClose()
@@ -97,13 +100,7 @@ func (me *TreeInfo) catchActionChannel() {
case a := <-me.pluginChan:
log.Verbose("catchActionChannel() on ", a.WidgetId, a.WidgetType, a.ProgName)
muAction.Lock()
- if me.newAction == nil {
- log.Error(errors.New("toolkit newAction == nil"), a.WidgetId, a.ActionType, a.WidgetType)
- } else {
- // send this to the toolkit
- me.newAction(a)
- // me.ActionFromChannel(a)
- }
+ me.newAction(a)
muAction.Unlock()
}
}