parent
c780a62521
commit
86e6811aeb
2
Makefile
2
Makefile
|
@ -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
2
gui.go
|
@ -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 () {
|
||||
|
|
4
main.go
4
main.go
|
@ -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])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue