summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-04 14:44:14 -0500
committerJeff Carr <[email protected]>2025-09-04 14:44:14 -0500
commit8ab6e8fcdcbb6060ff4870b41c64aa7de68925ef (patch)
tree5dc0d3b51178250c5c448766f2e8fd70c61e631c /plugin.go
parent709094a80f9bf51485df9dc215688b9a4c9dbe54 (diff)
fixes to make the GUI plugins more reliablev0.22.51
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugin.go b/plugin.go
index 3a27b69..e07d046 100644
--- a/plugin.go
+++ b/plugin.go
@@ -59,6 +59,26 @@ type aplug struct {
var allPlugins []*aplug
+func (n *Node) LoadToolkitNew(name string) error {
+ log.Log(PLUG, "LoadToolkit() START for name =", name)
+ plug := initPlugin(name)
+ if plug == nil {
+ return errors.New("initPlugin(" + name + ") failed")
+ }
+ plug.dead = false
+
+ log.Log(PLUG, "LoadToolkit() sending Toolkit Init action to the plugin channel")
+ var a widget.Action
+ a.ActionType = widget.ToolkitInit
+ plug.pluginChan <- a
+ // sleep(.5) // temp hack until chan communication is setup
+
+ // TODO: find a new way to do this that is locking, safe and accurate
+ me.rootNode.redraw(plug)
+ log.Log(PLUG, "LoadToolkit() END for name =", name)
+ return nil
+}
+
func (n *Node) LoadToolkit(name string) (*Node, error) {
log.Log(PLUG, "LoadToolkit() START for name =", name)
plug := initPlugin(name)