diff options
Diffstat (limited to 'cmds/buttonplugin')
| -rw-r--r-- | cmds/buttonplugin/Makefile | 2 | ||||
| -rw-r--r-- | cmds/buttonplugin/log.go | 7 | ||||
| -rw-r--r-- | cmds/buttonplugin/main.go | 9 |
3 files changed, 9 insertions, 9 deletions
diff --git a/cmds/buttonplugin/Makefile b/cmds/buttonplugin/Makefile index 1903a67..74486e5 100644 --- a/cmds/buttonplugin/Makefile +++ b/cmds/buttonplugin/Makefile @@ -7,7 +7,7 @@ # run: build - ./buttonplugin --gui-toolkit gocui >/tmp/witgui.log.stderr 2>&1 + ./buttonplugin --gui gocui >/tmp/witgui.log.stderr 2>&1 build-release: go get -v -u -x . 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") diff --git a/cmds/buttonplugin/main.go b/cmds/buttonplugin/main.go index 1fd8b5f..3200e9e 100644 --- a/cmds/buttonplugin/main.go +++ b/cmds/buttonplugin/main.go @@ -20,14 +20,7 @@ func main() { // This will turn on all debugging // gui.SetDebug(true) - // myGui = gui.New().LoadToolkit("gocui") - // myGui = gui.New().LoadToolkit("andlabs") - // myGui = gui.New().Default() - if (args.GuiToolkit == nil) { - myGui = gui.New().Default() - } else { - myGui = gui.New().LoadToolkit(args.GuiToolkit[0]) - } + myGui = gui.New().Default() buttonWindow() // This is just a optional goroutine to watch that things are alive |
