more UI improvements
This commit is contained in:
parent
5d4850a93d
commit
2fafc0bd13
|
@ -87,23 +87,23 @@ func (r *patchesWindow) initWindow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
type patchSummary struct {
|
type patchSummary struct {
|
||||||
grid *gui.Node
|
grid *gui.Node
|
||||||
updateB *gui.Node
|
updateB *gui.Node
|
||||||
docsB *gui.Node
|
docsB *gui.Node
|
||||||
gitPushB *gui.Node
|
gitPushB *gui.Node
|
||||||
gitPullB *gui.Node
|
gitPullB *gui.Node
|
||||||
checkB *gui.Node
|
checkB *gui.Node
|
||||||
totalOL *gadgets.OneLiner
|
totalOL *gadgets.OneLiner
|
||||||
dirtyOL *gadgets.OneLiner
|
dirtyOL *gadgets.OneLiner
|
||||||
readonlyOL *gadgets.OneLiner
|
readonlyOL *gadgets.OneLiner
|
||||||
rw *gadgets.OneLiner
|
rw *gadgets.OneLiner
|
||||||
totalPatchesOL *gadgets.OneLiner
|
totalPatchesOL *gadgets.OneLiner
|
||||||
totalUserRepos *gui.Node
|
// totalUserRepos *gui.Node
|
||||||
totalDevelRepos *gui.Node
|
// totalDevelRepos *gui.Node
|
||||||
totalMasterRepos *gui.Node
|
// totalMasterRepos *gui.Node
|
||||||
// totalUserPatches *gui.Node
|
// totalUserPatches *gui.Node
|
||||||
totalDevelPatches *gui.Node
|
// totalDevelPatches *gui.Node
|
||||||
totalMasterPatches *gui.Node
|
// totalMasterPatches *gui.Node
|
||||||
// fileCount *gui.Node
|
// fileCount *gui.Node
|
||||||
unknownOL *gadgets.BasicEntry
|
unknownOL *gadgets.BasicEntry
|
||||||
unknownSubmitB *gui.Node
|
unknownSubmitB *gui.Node
|
||||||
|
@ -118,23 +118,19 @@ func (r *patchesWindow) submitPatchesBox(box *gui.Node) *patchSummary {
|
||||||
s.grid = group1.RawGrid()
|
s.grid = group1.RawGrid()
|
||||||
|
|
||||||
s.totalOL = gadgets.NewOneLiner(s.grid, "Total")
|
s.totalOL = gadgets.NewOneLiner(s.grid, "Total")
|
||||||
// _ = s.grid.NewLabel("total changes")
|
|
||||||
// _ = s.grid.NewLabel("user to devel")
|
|
||||||
s.grid.NextRow()
|
s.grid.NextRow()
|
||||||
|
|
||||||
s.dirtyOL = gadgets.NewOneLiner(s.grid, "dirty")
|
s.dirtyOL = gadgets.NewOneLiner(s.grid, "dirty")
|
||||||
_ = s.grid.NewLabel("") // skip a column
|
// _ = s.grid.NewLabel("") // skip a column
|
||||||
s.totalUserRepos = s.grid.NewLabel("x go repos")
|
// s.totalUserRepos = s.grid.NewLabel("x go repos")
|
||||||
s.grid.NextRow()
|
s.grid.NextRow()
|
||||||
|
|
||||||
s.readonlyOL = gadgets.NewOneLiner(s.grid, "read-only")
|
s.readonlyOL = gadgets.NewOneLiner(s.grid, "read-only")
|
||||||
_ = s.grid.NewLabel("") // skip a column
|
// _ = s.grid.NewLabel("") // skip a column
|
||||||
// s.totalUserPatches = s.grid.NewLabel("x patches")
|
|
||||||
s.grid.NextRow()
|
s.grid.NextRow()
|
||||||
|
|
||||||
s.rw = gadgets.NewOneLiner(s.grid, "r/w")
|
s.rw = gadgets.NewOneLiner(s.grid, "r/w")
|
||||||
_ = s.grid.NewLabel("") // skip a column
|
// _ = s.grid.NewLabel("") // skip a column
|
||||||
// s.fileCount = s.grid.NewLabel("x files")
|
|
||||||
s.grid.NextRow()
|
s.grid.NextRow()
|
||||||
|
|
||||||
group1 = box.NewGroup("Patchset Create")
|
group1 = box.NewGroup("Patchset Create")
|
||||||
|
@ -172,7 +168,7 @@ func (r *patchesWindow) submitPatchesBox(box *gui.Node) *patchSummary {
|
||||||
// line := "somedate " + s.reason.String() + " Author: me" + pset.GitAuthorEmail
|
// line := "somedate " + s.reason.String() + " Author: me" + pset.GitAuthorEmail
|
||||||
r.addPatchsetNew(pset)
|
r.addPatchsetNew(pset)
|
||||||
})
|
})
|
||||||
s.grid.NewButton("Get Patchsets", func() {
|
s.grid.NewButton("Get Patchset List", func() {
|
||||||
if psets, err := me.forge.GetPatchesets(); err != nil {
|
if psets, err := me.forge.GetPatchesets(); err != nil {
|
||||||
log.Info("Get Patchsets failed", err)
|
log.Info("Get Patchsets failed", err)
|
||||||
return
|
return
|
||||||
|
@ -216,7 +212,7 @@ func (r *patchesWindow) addPatchsetNew(pset *forgepb.Patchset) {
|
||||||
// does not run any commands
|
// does not run any commands
|
||||||
func (s *patchSummary) Update() {
|
func (s *patchSummary) Update() {
|
||||||
var total, dirty, readonly, rw int
|
var total, dirty, readonly, rw int
|
||||||
var userT int // , develT, masterT int
|
// var userT int // , develT, masterT int
|
||||||
// var userP, develP, masterP int
|
// var userP, develP, masterP int
|
||||||
// broken after move to forge protobuf
|
// broken after move to forge protobuf
|
||||||
all := me.forge.Repos.SortByFullPath()
|
all := me.forge.Repos.SortByFullPath()
|
||||||
|
@ -236,5 +232,5 @@ func (s *patchSummary) Update() {
|
||||||
s.dirtyOL.SetText(strconv.Itoa(dirty) + " repos")
|
s.dirtyOL.SetText(strconv.Itoa(dirty) + " repos")
|
||||||
s.readonlyOL.SetText(strconv.Itoa(readonly) + " repos")
|
s.readonlyOL.SetText(strconv.Itoa(readonly) + " repos")
|
||||||
s.rw.SetText(fmt.Sprintf("%d repos", rw))
|
s.rw.SetText(fmt.Sprintf("%d repos", rw))
|
||||||
s.totalUserRepos.SetText(strconv.Itoa(userT) + " repos")
|
// s.totalUserRepos.SetText(strconv.Itoa(userT) + " repos")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue