work on delete and full protobuf gui
This commit is contained in:
parent
f01423a151
commit
7367335143
|
@ -95,20 +95,21 @@ func makeReposWin() *gadgets.GenericWindow {
|
||||||
log.Info("test delete window here")
|
log.Info("test delete window here")
|
||||||
}
|
}
|
||||||
grid := insertWin.Group.RawGrid()
|
grid := insertWin.Group.RawGrid()
|
||||||
found := new(gitpb.Repos)
|
|
||||||
all := me.forge.Repos.SortByFullPath()
|
|
||||||
for all.Scan() {
|
|
||||||
repo := all.Next()
|
|
||||||
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
found.AppendByGoPath(repo)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
var t *gitpb.ReposTable
|
var t *gitpb.ReposTable
|
||||||
grid.NewButton("insert table", func() {
|
grid.NewButton("insert table", func() {
|
||||||
|
found := new(gitpb.Repos)
|
||||||
|
all := me.forge.Repos.SortByFullPath()
|
||||||
|
for all.Scan() {
|
||||||
|
repo := all.Next()
|
||||||
|
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
found.AppendByGoPath(repo)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// make the window for the first time
|
// make the window for the first time
|
||||||
t = addWindowPB(insertWin, found)
|
t = addWindowPB(insertWin, found)
|
||||||
log.Info("table has uuid", t.GetUuid())
|
log.Info("table has uuid", t.GetUuid())
|
||||||
|
@ -116,6 +117,15 @@ func makeReposWin() *gadgets.GenericWindow {
|
||||||
|
|
||||||
grid.NewButton("attempt to delete table", func() {
|
grid.NewButton("attempt to delete table", func() {
|
||||||
t.Delete()
|
t.Delete()
|
||||||
|
t = nil
|
||||||
|
})
|
||||||
|
|
||||||
|
grid.NewButton("insert dirty table", func() {
|
||||||
|
found := findDirty()
|
||||||
|
|
||||||
|
// make the window for the first time
|
||||||
|
t = addWindowPB(insertWin, found)
|
||||||
|
log.Info("table has uuid", t.GetUuid())
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -360,7 +370,7 @@ func makeWindowForPB() *gadgets.GenericWindow {
|
||||||
func addWindowPB(win *gadgets.GenericWindow, pb *gitpb.Repos) *gitpb.ReposTable {
|
func addWindowPB(win *gadgets.GenericWindow, pb *gitpb.Repos) *gitpb.ReposTable {
|
||||||
t := pb.NewTable("testForgeRepos")
|
t := pb.NewTable("testForgeRepos")
|
||||||
t.NewUuid()
|
t.NewUuid()
|
||||||
tbox := win.Bottom.Box()
|
tbox := win.Bottom.Box().SetProgName("TBOX")
|
||||||
t.SetParent(tbox)
|
t.SetParent(tbox)
|
||||||
|
|
||||||
sf := t.AddStringFunc("repo", func(r *gitpb.Repo) string {
|
sf := t.AddStringFunc("repo", func(r *gitpb.Repo) string {
|
||||||
|
|
Loading…
Reference in New Issue