summaryrefslogtreecommitdiff
path: root/windowRepos.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-05-31 14:38:55 -0500
committerJeff Carr <[email protected]>2025-05-31 14:38:55 -0500
commit9f367cb39b6f6275b0f88fc4fc038cdec33334fa (patch)
tree1d6ae341f67905ec304c11a2dc7d26a9bfd6ab1e /windowRepos.go
parent2f8da5a8be17c161c107cff96adabe178c977500 (diff)
drop old code. rearrange buttons
Diffstat (limited to 'windowRepos.go')
-rw-r--r--windowRepos.go80
1 files changed, 0 insertions, 80 deletions
diff --git a/windowRepos.go b/windowRepos.go
deleted file mode 100644
index f7fe477..0000000
--- a/windowRepos.go
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
-// Use of this source code is governed by the GPL 3.0
-
-package main
-
-// An app to submit patches for the 30 GO GUI repos
-
-import (
- "sync"
-
- "go.wit.com/gui"
- "go.wit.com/lib/gadgets"
- "go.wit.com/lib/protobuf/gitpb"
- "go.wit.com/log"
-)
-
-type stdReposTableWin struct {
- sync.Mutex
- win *gadgets.GenericWindow // the machines gui window
- boxTB *gui.Node // the machines gui parent box widget
- TB *gitpb.ReposTable // the gui table buffer
- pb *gitpb.Repos // the current repos protobuf
- update bool // if the window should be updated
-}
-
-func (w *stdReposTableWin) Toggle() {
- if w == nil {
- return
- }
- if w.win == nil {
- return
- }
- w.win.Toggle()
-}
-
-func makeReposWindowNew() *gadgets.GenericWindow {
- win := gadgets.NewGenericWindow("git repos", "Filter")
- win.Custom = func() {
- // sets the hidden flag to false so Toggle() works
- win.Hide()
- }
-
- hbox := win.Group.Box().Horizontal()
- hbox.NewCheckbox("broken")
- hbox.NewCheckbox("dirty")
- hbox.NewCheckbox("mine")
- hbox.NewButton("fix all", func() {
- log.Info("try to fix everything here")
- })
-
- var writeWin *gadgets.GenericWindow
- me.repoWritableB = hbox.NewButton("writable", func() {
- // if the window exists, just toggle it open or closed
- if writeWin != nil {
- writeWin.Toggle()
- return
- }
-
- // make the window for the first time
- found := new(gitpb.Repos)
- for repo := range me.forge.Repos.IterByFullPath() {
- if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
- continue
- }
-
- found.AppendByGoPath(repo)
-
- }
- writeWin, _ = makeWritableWindow(found)
- writeWin.Win.Custom = func() {
- log.Info("closing window. could do somethine here")
- writeWin.Toggle()
- }
- })
-
- t := makeStandardReposGrid(me.forge.Repos)
- t.SetParent(win.Bottom)
- t.ShowTable()
- return win
-}