2024-02-17 08:39:55 -06:00
|
|
|
package repolist
|
|
|
|
|
|
|
|
import (
|
2024-11-04 02:14:54 -06:00
|
|
|
"sync"
|
|
|
|
|
2024-02-17 08:39:55 -06:00
|
|
|
"go.wit.com/gui"
|
|
|
|
"go.wit.com/lib/gui/repostatus"
|
2024-11-28 18:27:38 -06:00
|
|
|
"go.wit.com/lib/protobuf/forgepb"
|
2024-11-28 21:03:23 -06:00
|
|
|
"go.wit.com/lib/protobuf/gitpb"
|
2024-02-17 08:39:55 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
var me *RepoList
|
|
|
|
|
|
|
|
func (b *RepoList) Disable() {
|
|
|
|
b.reposbox.Disable()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (b *RepoList) Enable() {
|
|
|
|
b.reposbox.Enable()
|
|
|
|
}
|
|
|
|
|
|
|
|
// this app's variables
|
|
|
|
type RepoList struct {
|
2024-11-04 02:14:54 -06:00
|
|
|
sync.RWMutex
|
|
|
|
|
2024-11-28 18:27:38 -06:00
|
|
|
// the main window and box
|
|
|
|
mainWindow *gui.Node
|
2024-11-28 18:36:00 -06:00
|
|
|
mainbox *gui.Node
|
2024-11-28 18:27:38 -06:00
|
|
|
|
2024-02-25 13:10:23 -06:00
|
|
|
onlyMe bool
|
|
|
|
goSrcPwd string
|
|
|
|
allrepos map[string]*RepoRow
|
|
|
|
viewName string
|
2024-03-01 21:35:42 -06:00
|
|
|
cfgfile string
|
2024-02-17 08:39:55 -06:00
|
|
|
|
2024-11-28 18:27:38 -06:00
|
|
|
forge *forgepb.Forge
|
|
|
|
|
2024-02-17 08:39:55 -06:00
|
|
|
reposbox *gui.Node
|
|
|
|
reposgrid *gui.Node
|
|
|
|
reposgroup *gui.Node
|
2024-02-18 10:49:52 -06:00
|
|
|
|
2025-01-30 11:02:37 -06:00
|
|
|
blind *gui.Node // put things here that can't be seen
|
2024-02-19 19:43:21 -06:00
|
|
|
shownCount *gui.Node
|
2024-02-23 09:02:51 -06:00
|
|
|
hideFunction func(*RepoRow)
|
2024-02-20 18:55:50 -06:00
|
|
|
duration *gui.Node
|
2025-01-30 11:02:37 -06:00
|
|
|
rows []*RepoRow
|
2024-02-17 08:39:55 -06:00
|
|
|
}
|
|
|
|
|
2024-02-23 09:02:51 -06:00
|
|
|
type RepoRow struct {
|
2025-01-30 11:02:37 -06:00
|
|
|
hidden bool // is it currently hidden from view?
|
|
|
|
pb *gitpb.Repo // the underlying protobuf
|
|
|
|
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
|
|
|
|
pbState *gui.Node // the state of the protobuf
|
|
|
|
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 // todo: move that code here?
|
|
|
|
commitB *gui.Node // the git commit button
|
2024-02-17 08:39:55 -06:00
|
|
|
}
|