diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -7,7 +7,7 @@ import ( "go.wit.com/log" - "go.wit.com/gui/gui" + "go.wit.com/gui" "go.wit.com/lib/gadgets" "go.wit.com/lib/gui/repostatus" ) @@ -16,10 +16,13 @@ import ( var resToolkit embed.FS func main() { - myGui = gui.New() - myGui.InitEmbed(resToolkit) - myGui.LoadToolkit("nocui") - myGui.Default() + me = new(repoType) + me.allrepos = make(map[*repo]string) + + me.myGui = gui.New() + me.myGui.InitEmbed(resToolkit) + me.myGui.LoadToolkit("nocui") + me.myGui.Default() autotypistWindow() // repoworld() @@ -64,26 +67,26 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri newRepo.cButton.Hide() newRepo.pButton.Hide() } - newRepo.status = repostatus.New(myGui, newRepo.path) + newRepo.status = repostatus.New(me.myGui, newRepo.path) newRepo.status.SetMasterName(master) newRepo.status.SetDevelName(devel) newRepo.status.SetUserName(user) newRepo.hidden = false newRepo.status.Update() newRepo.newScan() - allrepos = append(allrepos, newRepo) + me.allrepos[newRepo] = path } func autotypistWindow() { /* - me.autotypistWindow = gadgets.NewBasicWindow(myGui, "autotypist for GO & git. it types faster than you can.") + me.autotypistWindow = gadgets.NewBasicWindow(me.myGui, "autotypist for GO & git. it types faster than you can.") me.autotypistWindow.Make() me.autotypistWindow.StandardExit() box := me.autotypistWindow.Box() me.autotypistWindow.Draw() */ - win := myGui.NewWindow("autotypist for GO & git. it types faster than you can.") + win := me.myGui.NewWindow("autotypist for GO & git. it types faster than you can.") box := win.NewBox("bw hbox", true) globalDisplayOptions(box) globalBuildOptions(box) @@ -93,7 +96,7 @@ func autotypistWindow() { // This creates a window func repoworld() { - reposwin = gadgets.NewBasicWindow(myGui, "All git repositories in ~/go/src/") + reposwin = gadgets.NewBasicWindow(me.myGui, "All git repositories in ~/go/src/") reposwin.Make() reposbox = reposwin.Box().NewBox("bw vbox", false) |
