diff options
Diffstat (limited to 'doGui.go')
| -rw-r--r-- | doGui.go | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -10,6 +10,7 @@ import ( "time" "go.wit.com/gui" + "go.wit.com/lib/fhelp" "go.wit.com/lib/gadgets" "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" @@ -38,8 +39,19 @@ func refresh() { func doGui() { me.myGui = gui.New() - me.myGui.InitEmbed(resources) - me.myGui.Default() + me.myGui.SetAppDefaultPlugin("gocui") // sets the default GUI plugin to use + if pname, err := me.myGui.Default(); err != nil { + if !fhelp.BuildPlugin("gocui") { + log.Info("You can't run the forge GUI since the plugins did not build", pname) + okExit("") + } else { + if err := me.myGui.LoadToolkitNew("gocui"); err != nil { + log.Info("The plugins built, but still failed to load", pname) + badExit(err) + } + log.Info("The plugins built and loaded!", pname) + } + } win := gadgets.RawBasicWindow("Zookeeper: (inventory your cluster)") win.Make() |
