summaryrefslogtreecommitdiff
path: root/treeInit.go
diff options
context:
space:
mode:
Diffstat (limited to 'treeInit.go')
-rw-r--r--treeInit.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/treeInit.go b/treeInit.go
index 78ff4fb..aa709a8 100644
--- a/treeInit.go
+++ b/treeInit.go
@@ -32,6 +32,9 @@ package main
*/
import (
+ "time"
+
+ log "go.wit.com/log"
"go.wit.com/toolkits/tree"
"go.wit.com/widget"
)
@@ -49,9 +52,20 @@ func Callback(guiCallback chan widget.Action) {
func PluginChannel() chan widget.Action {
initOnce.Do(initPlugin)
+ for {
+ if me.myTree != nil {
+ break
+ }
+ log.Info("me.myTree == nil")
+ time.Sleep(300 * time.Millisecond)
+ }
return me.myTree.PluginChannel()
}
+func FrozenChannel() chan widget.Action {
+ return me.myTree.FrozenChannel()
+}
+
func initTree() *tree.TreeInfo {
t := tree.New()
t.PluginName = PLUGIN
@@ -64,7 +78,11 @@ func initTree() *tree.TreeInfo {
t.Enable = enableWidget
t.Disable = disableWidget
+ t.Show = showWidget
+ t.Hide = hideWidget
+
t.SetChecked = setChecked
+ t.ToolkitInit = toolkitInit
t.ToolkitClose = toolkitClose
t.ShowTable = showTable