From e799a19b2cca024cb8effa0da7c97de580d7118c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 02:04:56 -0500 Subject: working on the GUI init process --- init.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'init.go') diff --git a/init.go b/init.go index 87df3c7..10cdcb4 100644 --- a/init.go +++ b/init.go @@ -43,7 +43,7 @@ func initNew() { me.guiChan = make(chan widget.Action, 1) version, err := getGuiVersion() - log.Println("GO GUI version", version, showVersion()+"", err) + log.Printf("go.wit.com/gui %s %s %v\n", version, showVersion(), err) if version == "" { log.Warn("Warning: compiled without version", err) log.Sleep(1) @@ -106,9 +106,9 @@ func getGuiVersion() (string, error) { // log.Println("GUI build $GUIVERSION", found) return found, nil } - found = "pre-v1-GO111" + found = "pre-v1" // log.Println("GUI build version:", found) - return found, errors.New("GO111 developer build") + return found, errors.New("CUI colortest line") } // lookup the widget by the id sent from the toolkit @@ -325,7 +325,7 @@ func New() *Node { */ if argGui.GuiPluginHack != "" { // does os.Exec() and does not return - testPluginAndExit() + TestPluginAndExit() } if argGui.GuiVerbose { @@ -336,6 +336,12 @@ func New() *Node { return me.rootNode } +func PreInit(postMustParse func(string) string) *Node { + initNew() + me.postMustParse = postMustParse + return me.rootNode +} + func NoGui() bool { return argGui.NoGui } @@ -346,7 +352,7 @@ func (n *Node) Default() (string, error) { // used to check if plugins load or not if argGui.GuiPluginHack != "" { // does os.Exec() and does not return - testPluginAndExit() + TestPluginAndExit() os.Exit(0) } -- cgit v1.2.3