diff options
Diffstat (limited to 'doGui.go')
| -rw-r--r-- | doGui.go | 70 |
1 files changed, 55 insertions, 15 deletions
@@ -3,25 +3,65 @@ package main +import ( + "os" + + "go.wit.com/lib/gadgets" + "go.wit.com/lib/gui/shell" + "go.wit.com/log" +) + // An app to submit patches for the 30 GO GUI repos func doGui() { - win := makebasicWindow() - win.Show() - /* - win := gadgets.NewGenericWindow("testing", "Current Conversations") - win.Custom = func() { - log.Warn("MAIN WINDOW CLOSE") - gui.StandardExit() - os.Exit(0) - } + log.Warn("init basicWindow state") + win := gadgets.RawBasicWindow("Create .deb files for GO applications") + win.Make() + win.Custom = func() { + log.Info("got to close") + os.Exit(0) + } + + box1 := win.Box() + // me.cBox = newControl(box1) + cbox := newControl(box1) + + vbox := box1.Box().Horizontal() + group1 := vbox.NewGroup("controls").Horizontal() // Vertical() + + group1.NewButton("go build", func() { + shell.Run([]string{"go", "build", "-v", "-x"}) + }) - grid := win.Group.RawGrid() + group1.NewButton("read control file", func() { + readControlFile(me.repo) + }) - grid.NewLabel("label worked") - grid.NextRow() + group1.NewButton("write control file", func() { + writeDebianControlFile(me.repo) + }) - grid.NewButton("more", func() { - }) - */ + group1.NewButton("update gui", func() { + updateControl(cbox) + }) + + group1.NewButton("dump repo.Control", func() { + // log.Info("CONTROL:", me.repo.Control) + for v := range me.repo.Control { + log.Info("CONTROL:", v, me.repo.Control[v]) + } + }) + + group1.NewButton("Make .deb", func() { + win.Disable() + if ok, err := buildPackage(me.repo); ok { + log.Info("build worked") + os.Exit(0) + } else { + log.Warn("build failed", err) + } + win.Enable() + }) + + win.Show() } |
