summaryrefslogtreecommitdiff
path: root/testGui/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'testGui/main.go')
-rw-r--r--testGui/main.go26
1 files changed, 10 insertions, 16 deletions
diff --git a/testGui/main.go b/testGui/main.go
index c6880c1..4c55f66 100644
--- a/testGui/main.go
+++ b/testGui/main.go
@@ -20,27 +20,21 @@ func main() {
// load the ~/.config/forge/ config
me.forge = forgepb.Init()
- if me.forge == nil {
- panic("damn it, forge is nil")
- }
- if me.forge.Config == nil {
- panic("damn it config")
- }
me.forge.ConfigPrintTable()
+ if err := me.forge.Machine.ConfigLoad(); err != nil {
+ log.Warn("zoopb.ConfigLoad() failed", err)
+ os.Exit(-1)
+ }
+ me.forge.Machine.InitWit()
+
// setup the GUI
me.myGui = gui.New()
me.myGui.Default()
- // todo: this code sucks. fix it soon
- me.mainWindow = me.myGui.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.repoList = repolist.AutotypistView(me.mainbox)
- me.repoList.Init(me.forge)
+ me.repoList = repolist.Init(me.forge, me.myGui)
- me.Enable()
+ me.repoList.Enable()
failed := make(map[*repolist.RepoRow]string)
versions := make(map[*repolist.RepoRow]string)
@@ -54,10 +48,10 @@ func main() {
var alreadyBuilt bool
ver := repo.Status.DebianReleaseVersion()
name := me.forge.DebName(repo.GoPath())
- if me.machine.IsInstalled(name) {
+ if me.forge.Machine.IsInstalled(name) {
end += "(installed) "
}
- if actualp := me.machine.FindVersion(name, ver); actualp != nil {
+ if actualp := me.forge.Machine.FindVersion(name, ver); actualp != nil {
end += " (version match) " + actualp.Version + " " + ver + " "
alreadyBuilt = true
} else {