InitBox() for autotypist
This commit is contained in:
parent
f750b96cc5
commit
57cbde285b
26
init.go
26
init.go
|
@ -35,3 +35,29 @@ func Init(f *forgepb.Forge, g *gui.Node) *RepoList {
|
||||||
me.Enable()
|
me.Enable()
|
||||||
return me
|
return me
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func InitBox(f *forgepb.Forge, newbox *gui.Node) *RepoList {
|
||||||
|
me = new(RepoList)
|
||||||
|
|
||||||
|
// make a window with a table of all the repos
|
||||||
|
me.AutotypistView(newbox)
|
||||||
|
|
||||||
|
me.Enable()
|
||||||
|
me.forge = f
|
||||||
|
|
||||||
|
me.viewName = "autotypist"
|
||||||
|
|
||||||
|
repos := me.forge.Repos.SortByPath()
|
||||||
|
for repos.Scan() {
|
||||||
|
repo := repos.Next()
|
||||||
|
if me.forge.IsReadOnly(repo.GoPath) {
|
||||||
|
log.Info("repo scan readonly directory:", repo.FullPath)
|
||||||
|
} else {
|
||||||
|
log.Info("repo scan writable directory:", repo.FullPath)
|
||||||
|
me.AddRepo(repo)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
me.Enable()
|
||||||
|
return me
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue