From ec31997bca317fae2d83cfdea8bd1fcdbe76be93 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 04:38:01 -0500 Subject: cleaner common gui code --- argv.go | 4 +--- init.go | 21 ++++----------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/argv.go b/argv.go index 2bcbf4e..c22f52e 100644 --- a/argv.go +++ b/argv.go @@ -1,7 +1,5 @@ package gui -import "go.wit.com/dev/alexflint/arg" - var argGui ArgsGui /* @@ -29,5 +27,5 @@ func ArgToolkit() string { } func InitArg() { - arg.Register(&argGui) + // arg.Register(&argGui) } diff --git a/init.go b/init.go index 8b8d856..a15d7b6 100644 --- a/init.go +++ b/init.go @@ -48,10 +48,6 @@ func colorBanner() { if version == "" { log.Warn("Warning: compiled without version", err) } - if me.postMustParse != nil { - log.Info("VERBOSE =", me.postMustParse("VERBOSE")) - log.Info("FILE =", me.postMustParse("FILE")) - } time.Sleep(3200 * time.Millisecond) // done for effect } @@ -329,11 +325,6 @@ func New() *Node { func PreInit(postMustParse func(string) string) *Node { initNew() - /* - if argGui.GuiVerbose { - INFO.SetBool(true) - } - */ me.postMustParse = postMustParse return me.rootNode } @@ -342,14 +333,10 @@ func PreInit(postMustParse func(string) string) *Node { // try to load andlabs, if that doesn't work, fall back to the console func (n *Node) Default() (string, error) { var err error - /* - // used to check if plugins load or not - if argGui.GuiPluginHack != "" { - // does os.Exec() and does not return - TestPluginAndExit() - os.Exit(0) - } - */ + argGui.GuiPlugin = me.postMustParse("DEFAULT") + if me.postMustParse("VERBOSE") == "true" { + INFO.SetBool(true) + } if argGui.GuiPlugin != "" { log.Log(WARN, "New.Default() try toolkit =", argGui.GuiPlugin) -- cgit v1.2.3