summaryrefslogtreecommitdiff
path: root/new.go
blob: 62429874dc1c9975c72be472c5d62fc9c578b190 (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
package repostatus

import (
	"go.wit.com/gui/gui"
	"go.wit.com/lib/gadgets"
	"go.wit.com/log"
)

func New(p *gui.Node, path string) *RepoStatus {
	rs := &RepoStatus{
		hidden:   true,
		ready:    false,
		parent:   p,
		repopath: path,
	}
	rs.tags = make(map[string]string)
	rs.window = gadgets.NewBasicWindow(p, "GO Repo Details "+path)
	rs.window.Horizontal()
	rs.window.Make()
	rs.ready = true
	rs.draw()
	rs.window.Custom = func() {
		// rs.hidden = true
		rs.Hide()
		log.Warn("repostatus user closed the window()")
	}
	return rs
}