summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/init.go b/init.go
index a5e081d..7ec3cb5 100644
--- a/init.go
+++ b/init.go
@@ -6,17 +6,15 @@ import (
"go.wit.com/log"
)
-func (rl *RepoList) Init(f *forgepb.Forge) {
- if rl == nil {
- rl = new(RepoList)
- }
- me = rl
+func Init(f *forgepb.Forge, g *gui.Node) *RepoList {
+ me = new(RepoList)
+
// todo: this code sucks. fix it soon
- me.mainWindow = gui.NewWindow("builds and uploads all the packages")
+ me.mainWindow = g.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.AutotypistView(me.mainbox)
me.Enable()
me.forge = f
@@ -29,4 +27,5 @@ func (rl *RepoList) Init(f *forgepb.Forge) {
}
me.Enable()
+ return me
}