summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-09 11:55:18 -0600
committerJeff Carr <[email protected]>2024-01-09 11:55:18 -0600
commit41e517b85df05e54b63f946f90a5de0953f10027 (patch)
tree8d7c18f66a4fc158c03d48eb1699c6d072640d39 /main.go
parentcf3e295566558cbaabe4c2a01bbff2cadaebc5f0 (diff)
compiles
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go27
1 files changed, 25 insertions, 2 deletions
diff --git a/main.go b/main.go
index 91e896e..d814277 100644
--- a/main.go
+++ b/main.go
@@ -10,6 +10,7 @@ import (
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
"go.wit.com/apps/control-panel-dns/smartwindow"
+ "go.wit.com/apps/myrepos/repostatus"
)
var myGui *gui.Node
@@ -35,6 +36,8 @@ type repo struct {
cButton *gui.Node // commit button
pButton *gui.Node // push button
+
+ status *repostatus.RepoStatus
}
func main() {
@@ -65,8 +68,16 @@ func addRepo(grid *gui.Node, path string) *repo {
newRepo.jcarrVersion = grid.NewLabel("")
newRepo.dirtyLabel = grid.NewLabel("")
- newRepo.cButton = grid.NewButton("commit", func () {
- log.Println("commit")
+ newRepo.cButton = grid.NewButton("status", func () {
+ log.Println("repo status for", newRepo.path)
+ if newRepo.status == nil {
+ newRepo.status = repostatus.New(myGui, newRepo.path)
+ newRepo.status.InitWindow()
+ newRepo.status.Make()
+ newRepo.status.Draw()
+ newRepo.status.Draw2()
+ }
+ newRepo.status.Toggle()
})
newRepo.pButton = grid.NewButton("push", func () {
log.Println("push")
@@ -102,6 +113,18 @@ func helloworld() {
log.Warn("repo =", repo)
addRepo(grid, repo)
}
+
+ var mystatus *repostatus.RepoStatus
+ box2.NewButton("repostatus()", func () {
+ if mystatus == nil {
+ mystatus = repostatus.New(myGui, "go.wit.com/gui/gui")
+ mystatus.InitWindow()
+ mystatus.Make()
+ mystatus.Draw()
+ mystatus.Draw2()
+ }
+ mystatus.Toggle()
+ })
box2.NewButton("checkout jcarr (all repos)", func () {
for _, r := range allrepos {
r.checkoutBranch("jcarr")