move buttons around
This commit is contained in:
parent
912c5a9bb9
commit
2f8da5a8be
|
@ -6,13 +6,9 @@ package main
|
||||||
// An app to submit patches for the 30 GO GUI repos
|
// An app to submit patches for the 30 GO GUI repos
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
"go.wit.com/lib/debugger"
|
|
||||||
"go.wit.com/lib/gadgets"
|
"go.wit.com/lib/gadgets"
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
@ -52,6 +48,31 @@ func makeReposWindowNew() *gadgets.GenericWindow {
|
||||||
log.Info("try to fix everything here")
|
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 := makeStandardReposGrid(me.forge.Repos)
|
||||||
t.SetParent(win.Bottom)
|
t.SetParent(win.Bottom)
|
||||||
t.ShowTable()
|
t.ShowTable()
|
||||||
|
|
|
@ -8,10 +8,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.wit.com/gui"
|
|
||||||
"go.wit.com/lib/debugger"
|
"go.wit.com/lib/debugger"
|
||||||
"go.wit.com/lib/gadgets"
|
"go.wit.com/lib/gadgets"
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
|
@ -48,30 +46,6 @@ func makeReposWin() *stdReposTableWin {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
var writeWin *gadgets.GenericWindow
|
|
||||||
me.repoWritableB = grid.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")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
me.repoAllB = grid.NewButton("All", func() {
|
me.repoAllB = grid.NewButton("All", func() {
|
||||||
me.found = new(gitpb.Repos)
|
me.found = new(gitpb.Repos)
|
||||||
all := me.forge.Repos.SortByFullPath()
|
all := me.forge.Repos.SortByFullPath()
|
||||||
|
|
Loading…
Reference in New Issue