summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-14 10:36:46 -0600
committerJeff Carr <[email protected]>2024-01-14 10:36:46 -0600
commit269490693ec8a153ab7d6718d9ecd7e09b6c322d (patch)
tree0f9df762066e31f5538cc5c6b0b66b1bcc104c69 /main.go
parent85d74dd70d06d8abf66256a1f1d9a6f2f1b57638 (diff)
margin works
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go50
1 files changed, 25 insertions, 25 deletions
diff --git a/main.go b/main.go
index 38280fa..ec742d9 100644
--- a/main.go
+++ b/main.go
@@ -75,27 +75,25 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
// This creates a window
func repoworld() {
- win := gadgets.NewBasicWindow(myGui, "git autotypist. it types faster than you can.")
- win.Make()
+ reposwin = gadgets.NewBasicWindow(myGui, "git autotypist. it types faster than you can.")
+ reposwin.Make()
- box := win.Box().NewBox("bw vbox", false)
- // box2 := win.Box().NewBox("bw vbox", false)
- group := box.NewGroup("go repositories (read from ~/.config/myrepolist)")
- grid := group.NewGrid("test", 11, 1)
- grid.Margin()
+ reposbox = reposwin.Box().NewBox("bw vbox", false)
+ reposgroup = reposbox.NewGroup("go repositories (read from ~/.config/myrepolist)")
+ reposgrid = reposgroup.NewGrid("test", 11, 1)
- grid.NewLabel("")
- grid.NewLabel("branch")
- grid.NewLabel("last tag")
- grid.NewLabel("Current Version")
- // grid.NewLabel("tags")
- grid.NewLabel("master")
- grid.NewLabel("devel")
- grid.NewLabel("user")
- grid.NewLabel("Status")
- grid.NewLabel("commit")
- grid.NewLabel("Toggle()")
- grid.NewLabel("Draw()")
+ reposgrid.NewLabel("")
+ reposgrid.NewLabel("branch")
+ reposgrid.NewLabel("last tag")
+ reposgrid.NewLabel("Current Version")
+ // reposgrid.NewLabel("tags")
+ reposgrid.NewLabel("master")
+ reposgrid.NewLabel("devel")
+ reposgrid.NewLabel("user")
+ reposgrid.NewLabel("Status")
+ reposgrid.NewLabel("commit")
+ reposgrid.NewLabel("Toggle()")
+ reposgrid.NewLabel("Draw()")
repos := myrepolist()
for _, line := range repos {
@@ -105,13 +103,15 @@ func repoworld() {
if dbranch == "" { dbranch = "devel" }
usr, _ := user.Current()
if ubranch == "" { ubranch = usr.Username }
- addRepo(grid, path, mbranch, dbranch, ubranch)
+ addRepo(reposgrid, path, mbranch, dbranch, ubranch)
}
- box2 := win.Box().NewBox("bw vbox", false)
- box2.NewButton("grid.Margin()", func () {
- grid.Margin()
- grid.Pad()
+ box2 := reposwin.Box().NewBox("bw vbox", false)
+ box2.NewButton("reposgrid.Margin()", func () {
+ log.Warn("reposgrid.Margin() RUN NOW")
+ reposgrid.Margin()
+ log.Warn("reposgrid.Pad() RUN NOW")
+ reposgrid.Pad()
})
box2.NewButton("status.Update() all", func () {
@@ -126,5 +126,5 @@ func repoworld() {
}
})
- win.Draw()
+ reposwin.Draw()
}