summaryrefslogtreecommitdiff
path: root/listWindow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-18 15:09:19 -0600
committerJeff Carr <[email protected]>2024-02-18 15:09:19 -0600
commite9352172acf1873ac10d3f7c53d6d3e94bb4cd53 (patch)
treefc39a63769517a5c5bdc77399f86cf0d2a50dd9a /listWindow.go
parent76efd35e3ef97e8635a02b849b89e4c704809f75 (diff)
guireleaser runs againv0.20.8
Diffstat (limited to 'listWindow.go')
-rw-r--r--listWindow.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/listWindow.go b/listWindow.go
index 55e5ed9..6c30e7c 100644
--- a/listWindow.go
+++ b/listWindow.go
@@ -14,6 +14,7 @@ import (
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/repostatus"
+ "go.wit.com/lib/gui/repolist"
"go.wit.com/lib/gui/shell"
)
@@ -68,7 +69,7 @@ func myrepolist() []string {
return lines
}
-func ListWindow() *gadgets.BasicWindow {
+func ListWindow(view *repolist.RepoList) *gadgets.BasicWindow {
if lw != nil {
if lw.Hidden() {
lw.Show()
@@ -85,7 +86,7 @@ func ListWindow() *gadgets.BasicWindow {
box := lw.Box()
group := box.NewGroup("list")
group.NewButton("make new go version list", func() {
- dumpVersions()
+ dumpVersions(view)
})
var lines []string
@@ -95,7 +96,7 @@ func ListWindow() *gadgets.BasicWindow {
for i, line := range myrepolist() {
parts := strings.Split(line, " ")
log.Info("adding:", i, parts)
- currents.add(parts[0])
+ currents.add(view, parts[0])
}
lines = dumpURL("https://go.wit.com/list")
@@ -111,7 +112,7 @@ func ListWindow() *gadgets.BasicWindow {
log.Warn(i, line)
parts := strings.Split(line, " ")
if currents != nil {
- currents.add(parts[0])
+ currents.add(view, parts[0])
}
}
for i, sec := range allsections {
@@ -184,7 +185,7 @@ func (r *witRepo) doDownload() bool {
return true
}
-func (s *section) add(path string) {
+func (s *section) add(view *repolist.RepoList, path string) {
if s == nil {
return
}
@@ -196,7 +197,7 @@ func (s *section) add(path string) {
tmp.doDownload()
lw.Enable()
})
- repo := repostatus.FindPath(path)
+ repo := view.FindRepo(path)
if repo != nil {
log.Verbose("repo is already downloaded", path)
tmp.downloadB.SetLabel("downloaded")