From 7880d9df6de1040258bea966f040e12be6205af1 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 2 Dec 2023 19:02:51 -0600 Subject: gocui plugin refactor to a *node binary tree rename arg '--gui ' add a cloudflare example fixes since go v1.21 didn't compile anymore due to argv order more place() changes recursive size computation gocui: Major refactor to use the *node binary tree gocui: refactor place() and size() gocui: better place() and spacing (tab, buttons, etc) gocui: better mouse click handling gocui: switch to using tk.gocuiSize & tk.size gocui: event handling cleanups gocui: add window labels work gocui: struct cleanups gocui: duplicate binary tree structs removed gocui: deprecate old children Signed-off-by: Jeff Carr --- cmds/buttonplugin/log.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmds/buttonplugin/log.go') diff --git a/cmds/buttonplugin/log.go b/cmds/buttonplugin/log.go index 13238f4..7d65d05 100644 --- a/cmds/buttonplugin/log.go +++ b/cmds/buttonplugin/log.go @@ -5,6 +5,7 @@ import ( "fmt" arg "github.com/alexflint/go-arg" "git.wit.org/wit/gui" + log "git.wit.org/wit/gui/log" ) @@ -14,6 +15,7 @@ var args struct { User string `arg:"env:USER"` Demo bool `help:"run a demo"` gui.GuiArgs + log.LogArgs } /* @@ -26,6 +28,11 @@ func init() { arg.MustParse(&args) fmt.Println(args.Foo, args.Bar, args.User) + if (args.Gui != "") { + gui.GuiArg.Gui = args.Gui + } + log.Log(true, "INIT() args.GuiArg.Gui =", gui.GuiArg.Gui) + /* log.Println() log.Println("STDOUT is now at /tmp/guilogfile") -- cgit v1.2.3