summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-20 05:06:08 -0600
committerJeff Carr <[email protected]>2025-01-20 05:06:08 -0600
commit5005edc9e37cb207f6c6035ea6fe3c3d98d94caa (patch)
tree2ef2a0ba9fa27a2ced91572261170a93fdb5c3c6 /init.go
parent250f1c756881c04720b277bbe1e56ece4988c88f (diff)
add a 'app' defined default plugin variablev0.22.22
Diffstat (limited to 'init.go')
-rw-r--r--init.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/init.go b/init.go
index 4dfbf07..3883fa1 100644
--- a/init.go
+++ b/init.go
@@ -280,6 +280,12 @@ func (n *Node) Default() *Node {
log.Log(WARN, "LoadToolkit() failed for =", argGui.GuiPlugin)
return nil
}
+ if me.appPlugin != "" {
+ if n, err = n.LoadToolkit(me.appPlugin); err == nil {
+ return n
+ }
+ }
+
// if DISPLAY isn't set, return since gtk can't load
// TODO: figure out how to check what to do in macos and mswindows
if os.Getenv("DISPLAY") == "" {
@@ -393,3 +399,9 @@ func trapStdout() {
// defer guioutf.Close()
}
+
+// sets the applications requested plugin
+// the command line arguements override this
+func (n *Node) SetAppDefaultPlugin(plugname string) {
+ me.appPlugin = plugname
+}