76 lines
1.5 KiB
Go
76 lines
1.5 KiB
Go
package repolist
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"go.wit.com/gui"
|
|
"go.wit.com/lib/gui/repostatus"
|
|
"go.wit.com/lib/protobuf/forgepb"
|
|
)
|
|
|
|
var me *RepoList
|
|
|
|
func (b *RepoList) Disable() {
|
|
b.reposbox.Disable()
|
|
}
|
|
|
|
func (b *RepoList) Enable() {
|
|
b.reposbox.Enable()
|
|
}
|
|
|
|
// this app's variables
|
|
type RepoList struct {
|
|
sync.RWMutex
|
|
|
|
// the main window and box
|
|
mainWindow *gui.Node
|
|
mainbox *gui.Node
|
|
|
|
onlyMe bool
|
|
goSrcPwd string
|
|
allrepos map[string]*RepoRow
|
|
viewName string
|
|
cfgfile string
|
|
|
|
forge *forgepb.Forge
|
|
|
|
reposbox *gui.Node
|
|
reposgrid *gui.Node
|
|
reposgroup *gui.Node
|
|
|
|
// put things here that can't be seen
|
|
blind *gui.Node
|
|
|
|
shownCount *gui.Node
|
|
hideFunction func(*RepoRow)
|
|
duration *gui.Node
|
|
|
|
rows []*RepoRow
|
|
}
|
|
|
|
type RepoRow struct {
|
|
hidden bool
|
|
lasttagrev string
|
|
// lasttag string
|
|
giturl string
|
|
|
|
pLabel *gui.Node // path label
|
|
|
|
targetV *gui.Node // the target version
|
|
lastTag *gui.Node // last tagged version label
|
|
currentName *gui.Node // current branch name
|
|
currentVersion *gui.Node // current branch version
|
|
gitState *gui.Node // git state (dirty or not?)
|
|
// goState *gui.Node // what is the state of the go.sum file
|
|
|
|
masterVersion *gui.Node // the master branch version
|
|
develVersion *gui.Node // the devel branch version
|
|
userVersion *gui.Node // the user branch version
|
|
|
|
endBox *gui.Node // a general box at the end of the row
|
|
statusButton *gui.Node // opens up the status window
|
|
diffButton *gui.Node // opens up the status window
|
|
|
|
Status *repostatus.RepoStatus
|
|
}
|