diff options
Diffstat (limited to 'viewAutotypist.go')
| -rw-r--r-- | viewAutotypist.go | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/viewAutotypist.go b/viewAutotypist.go index 410904a..090b37e 100644 --- a/viewAutotypist.go +++ b/viewAutotypist.go @@ -4,33 +4,28 @@ import "go.wit.com/gui" // This creates a view of the repos // you can only have one at this point -func AutotypistView(parent *gui.Node) *RepoList { - if me != nil { - return me - } - me = new(RepoList) - me.allrepos = make(map[string]*RepoRow) - me.viewName = "autotypist" +func (rl *RepoList) AutotypistView(parent *gui.Node) { + rl.allrepos = make(map[string]*RepoRow) + rl.viewName = "autotypist" - // me.reposbox = gui.RawBox() - me.reposbox = parent + // rl.reposbox = gui.RawBox() + rl.reposbox = parent - me.reposgroup = me.reposbox.NewGroup("my git repositories (configure in ~/.config/autotypist)") - // me.reposgroup.Menu = repolistMenu() // how to do a menu? what should the code look like? - me.reposgrid = me.reposgroup.NewGrid("test", 0, 0) + rl.reposgroup = rl.reposbox.NewGroup("my git repositories (configure in ~/.config/autotypist)") + // rl.reposgroup.Menu = repolistMenu() // how to do a menu? what should the code look like? + rl.reposgrid = rl.reposgroup.NewGrid("test", 0, 0) - me.reposgrid.NewLabel("") // path goes here - me.reposgrid.NewLabel("last tag").SetProgName("last tag") - me.reposgrid.NewLabel("master version") - me.reposgrid.NewLabel("devel version") - me.reposgrid.NewLabel("user version") - me.reposgrid.NewLabel("Status") - me.reposgrid.NewLabel("Current").SetProgName("CurrentName") - me.reposgrid.NewLabel("Version").SetProgName("CurrentVersion") - me.reposgrid.NextRow() + rl.reposgrid.NewLabel("") // path goes here + rl.reposgrid.NewLabel("last tag").SetProgName("last tag") + rl.reposgrid.NewLabel("master version") + rl.reposgrid.NewLabel("devel version") + rl.reposgrid.NewLabel("user version") + rl.reposgrid.NewLabel("Status") + rl.reposgrid.NewLabel("Current").SetProgName("CurrentName") + rl.reposgrid.NewLabel("Version").SetProgName("CurrentVersion") + rl.reposgrid.NextRow() - me.blind = gui.RawBox() - me.shownCount = me.blind.NewLabel("showCount") - me.duration = me.blind.NewLabel("duration") - return me + rl.blind = gui.RawBox() + rl.shownCount = rl.blind.NewLabel("showCount") + rl.duration = rl.blind.NewLabel("duration") } |
