attempt to switch table to just a grid
This commit is contained in:
parent
1e4362b29e
commit
efd0373c21
|
@ -6,6 +6,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"go.wit.com/lib/gadgets"
|
"go.wit.com/lib/gadgets"
|
||||||
"go.wit.com/lib/protobuf/forgepb"
|
"go.wit.com/lib/protobuf/forgepb"
|
||||||
|
@ -69,6 +70,7 @@ func makeRepoProblemsWindow() *repoProblemsWindow {
|
||||||
// sync.Once()
|
// sync.Once()
|
||||||
pw.win = gadgets.RawBasicWindow("Potential Repo Problems")
|
pw.win = gadgets.RawBasicWindow("Potential Repo Problems")
|
||||||
pw.win.Make()
|
pw.win.Make()
|
||||||
|
pw.win.Show()
|
||||||
|
|
||||||
pw.stack = pw.win.Box().NewBox("bw vbox", false)
|
pw.stack = pw.win.Box().NewBox("bw vbox", false)
|
||||||
pw.win.Custom = func() {
|
pw.win.Custom = func() {
|
||||||
|
@ -85,7 +87,38 @@ func makeRepoProblemsWindow() *repoProblemsWindow {
|
||||||
txt = fmt.Sprintf("devel is behind master (%d)", found.Len())
|
txt = fmt.Sprintf("devel is behind master (%d)", found.Len())
|
||||||
grid.NewButton(txt, func() {
|
grid.NewButton(txt, func() {
|
||||||
found := develBehindMasterProblem()
|
found := develBehindMasterProblem()
|
||||||
makeStandardReposWindow(found)
|
win := gadgets.RawBasicWindow("pbgrid in window")
|
||||||
|
win.Make()
|
||||||
|
win.Show()
|
||||||
|
box := win.Box().NewBox("bw vbox", false)
|
||||||
|
|
||||||
|
win.Custom = func() {
|
||||||
|
// sets the hidden flag to false so Toggle() works
|
||||||
|
win.Hide()
|
||||||
|
}
|
||||||
|
|
||||||
|
t := found.NewTable("testDirty")
|
||||||
|
t.SetParent(box)
|
||||||
|
sf := t.AddStringFunc("repo", func(r *gitpb.Repo) string {
|
||||||
|
return r.GetGoPath()
|
||||||
|
})
|
||||||
|
// t.Custom = func() {
|
||||||
|
// log.Info("close grid?")
|
||||||
|
// }
|
||||||
|
sf.Custom = func(r *gitpb.Repo) {
|
||||||
|
log.Info("do button click on", r.GetGoPath())
|
||||||
|
}
|
||||||
|
t.AddTimeFunc("age", func(repo *gitpb.Repo) time.Time {
|
||||||
|
return repo.NewestTime()
|
||||||
|
})
|
||||||
|
t.AddMasterVersion()
|
||||||
|
t.AddDevelVersion()
|
||||||
|
t.AddUserVersion()
|
||||||
|
t.AddCurrentBranchName()
|
||||||
|
t.AddState()
|
||||||
|
t.ShowTable()
|
||||||
|
|
||||||
|
// makeStandardReposWindow(found, box)
|
||||||
})
|
})
|
||||||
|
|
||||||
found = remoteUserBranchProblem()
|
found = remoteUserBranchProblem()
|
||||||
|
|
Loading…
Reference in New Issue