summaryrefslogtreecommitdiff
path: root/doGui.go
blob: b89a5ae53304d36ff15db8da44a62d80286a5d6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main

// An app to submit patches for the 30 GO GUI repos

import (
	"go.wit.com/gui"
	"go.wit.com/lib/gadgets"
	"go.wit.com/log"
)

func doGui() {
	me.myGui = gui.New()
	me.myGui.Default()

	me.mainWindow = gadgets.RawBasicWindow("Forge: (this doesn't work yet)")
	me.mainWindow.Make()
	me.mainWindow.Show()
	me.mainbox = me.mainWindow.Box()

	// disable the interface while everything is scanned
	me.Disable()

	vbox2 := me.mainbox.NewVerticalBox("BOX2")
	globalBuildOptions(vbox2)
	me.summary = submitPatchesBox(vbox2)

	me.repos = makeRepoView()

	// processing is done. update the repo summary box
	me.summary.Update()
	me.summary.submitB.Disable()

	me.Enable()

	// intermittently scans the status indefinitly
	me.repos.View.Watchdog(func() {
		log.Info("Watchdog in doGui()")
		// processing is done. update the repo summary box
		me.summary.Update()
	})
}