summaryrefslogtreecommitdiff
path: root/structs.go
blob: 532299391e07055ae9f71458829d43c254aef022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package repolist

import (
	"sync"

	"go.wit.com/gui"
	"go.wit.com/lib/gui/repostatus"
	"go.wit.com/lib/protobuf/forgepb"
	"go.wit.com/lib/protobuf/gitpb"
)

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

	blind        *gui.Node // put things here that can't be seen
	shownCount   *gui.Node
	hideFunction func(*RepoRow)
	duration     *gui.Node
	rows         []*RepoRow
}

type RepoRow struct {
	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?
	diff           *gui.Node              // the git diff button
	commitB        *gui.Node              // the git commit button
}