trying to debug box direction
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
3d4e297db9
commit
ed5857af77
6
Makefile
6
Makefile
|
@ -11,7 +11,11 @@ stderr: build
|
|||
goimports:
|
||||
goimports -w *.go
|
||||
# // to globally reset paths:
|
||||
# // gofmt -w -r "go.wit.com/gui -> go.wit.com/gui/gui" .
|
||||
# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
|
||||
|
||||
gocui: build
|
||||
reset
|
||||
./autotypist --gui gocui --tmp-log
|
||||
|
||||
build:
|
||||
echo "build it!"
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
this parses the command line arguements
|
||||
|
||||
this enables command line options from other packages like 'gui' and 'log'
|
||||
*/
|
||||
|
||||
import (
|
||||
"go.wit.com/dev/alexflint/arg"
|
||||
"go.wit.com/lib/debugger"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
// GadgetDisplay string `arg:"env:DISPLAY"`
|
||||
// GadgetTmpLog bool `arg:"--tmp-log" help:"automatically send STDOUT to /tmp"`
|
||||
// GadgetVerboseDNS bool `arg:"--verbose" help:"debug your dns settings"`
|
||||
var args struct {
|
||||
TmpLog bool `arg:"--tmp-log" help:"automatically send STDOUT to /tmp"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
arg.MustParse(&args)
|
||||
|
||||
if debugger.ArgDebug() {
|
||||
log.Info("cmd line --debugger == true")
|
||||
} else {
|
||||
log.Info("cmd line --debugger == false")
|
||||
}
|
||||
}
|
5
main.go
5
main.go
|
@ -17,6 +17,11 @@ func main() {
|
|||
me = new(autoType)
|
||||
me.allrepos = make(map[string]*repo)
|
||||
|
||||
if args.TmpLog {
|
||||
// send all log() output to a file in /tmp
|
||||
log.SetTmp()
|
||||
}
|
||||
|
||||
me.myGui = gui.New()
|
||||
me.myGui.InitEmbed(resToolkit)
|
||||
// me.myGui.LoadToolkit("nocui")
|
||||
|
|
62
repolist.go
62
repolist.go
|
@ -197,41 +197,47 @@ func repolistWindow() {
|
|||
func repoAllButtons(box *gui.Node) {
|
||||
// reposbox.SetExpand(false)
|
||||
group1 := box.NewGroup("Run on all repos:")
|
||||
grid1 := group1.NewGrid("test", 6, 1)
|
||||
|
||||
grid1.NewButton("merge all user to devel", func() {
|
||||
reposwin.Disable()
|
||||
if !mergeAllUserToDevel() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
hbox := group1.Box()
|
||||
// hbox.Horizontal()
|
||||
hbox.Vertical()
|
||||
|
||||
grid1.NewButton("merge all devel to main", func() {
|
||||
reposwin.Disable()
|
||||
if !mergeAllDevelToMain() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
grid1.NewButton("merge it all", func() {
|
||||
reposwin.Disable()
|
||||
if !mergeAllUserToDevel() {
|
||||
return
|
||||
}
|
||||
if !mergeAllDevelToMain() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
grid1.NewButton("status.Update() all", func() {
|
||||
box1 := hbox.Box().Vertical()
|
||||
box1.NewButton("status.Update() all", func() {
|
||||
for _, repo := range me.allrepos {
|
||||
repo.status.Update()
|
||||
repo.newScan()
|
||||
}
|
||||
})
|
||||
|
||||
box2 := hbox.Box().Vertical()
|
||||
box2.NewButton("merge all user to devel", func() {
|
||||
reposwin.Disable()
|
||||
if !mergeAllUserToDevel() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
box2.NewButton("merge all devel to main", func() {
|
||||
reposwin.Disable()
|
||||
if !mergeAllDevelToMain() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
box2.NewButton("merge it all", func() {
|
||||
reposwin.Disable()
|
||||
if !mergeAllUserToDevel() {
|
||||
return
|
||||
}
|
||||
if !mergeAllDevelToMain() {
|
||||
return
|
||||
}
|
||||
reposwin.Enable()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func mergeAllDevelToMain() bool {
|
||||
|
|
Loading…
Reference in New Issue