Isolate all GUI code in an attempt to make a library out of it.

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-08 13:02:27 -07:00
parent c5e590985e
commit 771f9eb29f
2 changed files with 8 additions and 10 deletions

8
gui.go
View File

@ -276,3 +276,11 @@ func addTableTab(name string, rowcount int, row1name string) {
maintab.Append(name, table)
maintab.SetMargined(tabcount, true)
}
func doGUI() {
ui.Main(setupUI)
log.Println("GUI exited. Not sure what to do here. os.Exit() ?")
onExit()
}

10
main.go
View File

@ -8,8 +8,6 @@ import "fmt"
import "bufio"
import "github.com/gookit/config"
import "github.com/andlabs/ui"
import _ "github.com/andlabs/ui/winmanifest"
// import "github.com/davecgh/go-spew/spew"
@ -59,14 +57,6 @@ func socketToWIT() {
}
}
func doGUI() {
ui.Main(setupUI)
log.Println("GUI exited. Not sure what to do here. os.Exit() ?")
onExit()
}
func main() {
parseConfig()