2024-11-28 18:27:38 -06:00
|
|
|
package repolist
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/gui"
|
2024-11-28 18:36:00 -06:00
|
|
|
"go.wit.com/lib/protobuf/forgepb"
|
2024-11-28 18:27:38 -06:00
|
|
|
"go.wit.com/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (rl *RepoList) Init(f *forgepb.Forge) {
|
|
|
|
if rl == nil {
|
|
|
|
rl = new(RepoList)
|
|
|
|
}
|
|
|
|
me = rl
|
|
|
|
// todo: this code sucks. fix it soon
|
|
|
|
me.mainWindow = gui.NewWindow("builds and uploads all the packages")
|
|
|
|
me.mainbox = me.mainWindow.NewBox("bw hbox", true)
|
|
|
|
|
|
|
|
// make a window with a table of all the repos
|
|
|
|
me = AutotypistView(me.mainbox)
|
|
|
|
|
|
|
|
me.Enable()
|
|
|
|
me.forge = f
|
|
|
|
|
|
|
|
repos := me.forge.Repos.SortByPath()
|
|
|
|
for repos.Scan() {
|
|
|
|
repo := repos.Next()
|
|
|
|
log.Info("repo scan directory:", repo.FullPath)
|
|
|
|
me.AddRepo(repo)
|
|
|
|
}
|
|
|
|
|
|
|
|
me.Enable()
|
|
|
|
}
|