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