summaryrefslogtreecommitdiff
path: root/windowFound.go
diff options
context:
space:
mode:
Diffstat (limited to 'windowFound.go')
-rw-r--r--windowFound.go100
1 files changed, 0 insertions, 100 deletions
diff --git a/windowFound.go b/windowFound.go
deleted file mode 100644
index 06c530f..0000000
--- a/windowFound.go
+++ /dev/null
@@ -1,100 +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
-
-// shows a window of the 'found' repos
-
-import (
- "go.wit.com/lib/gadgets"
- "go.wit.com/lib/protobuf/gitpb"
- "go.wit.com/log"
-
- "go.wit.com/gui"
-)
-
-type foundWindow struct {
- win *gadgets.BasicWindow // the patches window
- stack *gui.Node // the top box set as vertical
- grid *gui.Node // the list of available patches
- reason *gadgets.BasicEntry // the name of the patchset
- submitB *gui.Node // the submit patchet button
- psetgrid *gui.Node // the list of each patchset
- totalOL *gadgets.OneLiner
- dirtyOL *gadgets.OneLiner
- readonlyOL *gadgets.OneLiner
- rw *gadgets.OneLiner
- found *gitpb.Repos
-}
-
-func (r *foundWindow) Hidden() bool {
- return r.win.Hidden()
-}
-
-func (r *foundWindow) Toggle() {
- if r.Hidden() {
- r.Show()
- } else {
- r.Hide()
- }
-}
-
-func (r *foundWindow) Show() {
- r.win.Show()
-}
-
-func (r *foundWindow) Hide() {
- r.win.Hide()
-}
-
-// you can only have one of these
-func (r *foundWindow) initWindow() {
- r.win = gadgets.RawBasicWindow("Found Repos")
- r.win.Make()
-
- r.stack = r.win.Box().NewBox("bw vbox", false)
- // me.reposwin.Draw()
- r.win.Custom = func() {
- log.Warn("Found Window close. setting hidden=true")
- // sets the hidden flag to false so Toggle() works
- r.win.Hide()
- }
- group1 := r.stack.NewGroup("Repo Summary")
- group1.NewButton("dirty", func() {
- log.Info("find dirty here")
- found := me.forge.FindDirty()
- me.forge.PrintHumanTable(found)
- })
- group1.NewButton("all", func() {
- log.Info("find all here")
- found := findAll()
- me.forge.PrintHumanTable(found)
- })
-
- r.grid = r.stack.RawGrid()
-
- group1.NewButton("show", func() {
- r.listRepos()
- })
-}
-
-func (r *foundWindow) listRepos() {
- for repo := range r.found.IterAll() {
- r.addRepo(repo)
- }
-}
-
-func (r *foundWindow) addRepo(repo *gitpb.Repo) {
- r.grid.NewButton("View", func() {
- })
- r.grid.NewLabel(repo.GetGoPath())
- r.grid.NewLabel(repo.GetMasterVersion())
- r.grid.NewLabel(repo.GetDevelVersion())
- r.grid.NewLabel(repo.GetUserVersion())
- r.grid.NewLabel(repo.GetCurrentBranchName())
- r.grid.NextRow()
-}
-
-// will update this from the current state of the protobuf
-func (r *foundWindow) Update() {
-}