add the plugins

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-05-23 10:29:37 -05:00
parent c780a62521
commit 86e6811aeb
3 changed files with 5 additions and 3 deletions

View File

@ -6,7 +6,7 @@ VERSION = $(shell cat resources/VERSION)
# PATH=/usr/bin:$PATH go version
build:
git pull
# -git pull
-cp ~/go/src/git.wit.org/wit/gui/toolkit/*.so plugins/
GO111MODULE="off" go build -v
./wit-new-machine --gui-toolkit gocui >/tmp/witgui.log.stderr 2>&1

2
gui.go
View File

@ -51,7 +51,7 @@ func drawWindow() {
g.NewLabel("resolv.conf")
resolv = g.NewTextbox("resolv")
resolv.Dump(true)
resolv.Dump()
resolv.SetText("hello world\nfoo bar\n")
g.NewButton("Load 'gocui'", func () {

View File

@ -54,13 +54,15 @@ func main() {
os.Exit(0)
}
myGui = gui.New().InitEmbed(resToolkit)
if (args.GuiToolkit == nil) {
myGui = gui.New().Default()
} else {
if args.GuiToolkit[0] == "gocui" {
myGui = gui.New().LoadToolkit(args.GuiToolkit[0])
} else {
myGui = gui.New().InitEmbed(resToolkit).LoadToolkit(args.GuiToolkit[0])
myGui = gui.New().LoadToolkit(args.GuiToolkit[0]).InitEmbed(resToolkit)
// myGui = gui.New().InitEmbed(resToolkit).LoadToolkit(args.GuiToolkit[0])
}
}