fix "patchable" repos button
This commit is contained in:
parent
1282c17e81
commit
391d47318b
6
doGui.go
6
doGui.go
|
@ -197,8 +197,9 @@ func drawWindow(win *gadgets.GenericWindow) {
|
|||
patchesWin = makePatchesWin(notdone)
|
||||
})
|
||||
|
||||
gridM.NextRow()
|
||||
var howtoWin *gadgets.GenericWindow
|
||||
gridM.NewButton("Howto", func() {
|
||||
gridM.NewButton("Tutorial", func() {
|
||||
if howtoWin != nil {
|
||||
howtoWin.Toggle()
|
||||
return
|
||||
|
@ -206,6 +207,9 @@ func drawWindow(win *gadgets.GenericWindow) {
|
|||
howtoWin = makeHowtoWin()
|
||||
})
|
||||
|
||||
gridM.NextRow()
|
||||
gridM.NewLabel("")
|
||||
|
||||
group1 := win.Stack.NewGroup("Forge Mode (deprecated)")
|
||||
grid = group1.RawGrid()
|
||||
me.forgeMode = grid.NewLabel("")
|
||||
|
|
3
find.go
3
find.go
|
@ -117,7 +117,7 @@ func findPublishable() {
|
|||
}
|
||||
}
|
||||
|
||||
func findReposWithPatches() {
|
||||
func findReposWithPatches() *gitpb.Repos {
|
||||
for repo := range me.forge.Repos.IterByFullPath() {
|
||||
if repo.GetTargetVersion() != "" {
|
||||
// add everything that has a target version set
|
||||
|
@ -148,4 +148,5 @@ func findReposWithPatches() {
|
|||
continue
|
||||
}
|
||||
}
|
||||
return me.found
|
||||
}
|
||||
|
|
|
@ -41,14 +41,15 @@ func makeHowtoWin() *gadgets.GenericWindow {
|
|||
grid.NewLabel("") // a stupid way to add padding
|
||||
grid.NextRow()
|
||||
|
||||
howtoWin.Group.NewLabel("Working dir: " + me.forge.GetGoSrc())
|
||||
// howtoWin.Group.NewLabel("Working dir: " + me.forge.GetGoSrc())
|
||||
|
||||
grid = howtoWin.Group.RawGrid()
|
||||
grid.NewButton("Download", func() {
|
||||
grid.NewButton("Download into "+me.forge.GetGoSrc(), func() {
|
||||
howtoWin.Disable()
|
||||
defer howtoWin.Enable()
|
||||
downloadForge()
|
||||
})
|
||||
grid.NewButton("Build", func() {
|
||||
grid.NewButton("Build forge & GUI GO plugins", func() {
|
||||
howtoWin.Disable()
|
||||
defer howtoWin.Enable()
|
||||
buildForge()
|
||||
|
|
|
@ -112,12 +112,6 @@ func makeReposWin() *stdReposTableWin {
|
|||
|
||||
rwin.boxTB = win.Bottom.Box()
|
||||
|
||||
grid.NewButton("dirty on bottom", func() {
|
||||
log.Info("try to show dirty repos on bottom")
|
||||
found := findDirty()
|
||||
rwin.doReposTable(found)
|
||||
|
||||
})
|
||||
grid.NextRow()
|
||||
|
||||
found = develRemoteProblem()
|
||||
|
@ -135,7 +129,7 @@ func makeReposWin() *stdReposTableWin {
|
|||
})
|
||||
grid.NextRow()
|
||||
|
||||
makeHackModeWindow(win)
|
||||
makeHackModeWindow(rwin)
|
||||
return rwin
|
||||
}
|
||||
|
||||
|
@ -175,8 +169,8 @@ func (rwin *stdReposTableWin) doReposTable(pb *gitpb.Repos) {
|
|||
rwin.TB = t
|
||||
}
|
||||
|
||||
func makeHackModeWindow(win *gadgets.GenericWindow) {
|
||||
group := win.Top.NewGroup("This is a work in progress")
|
||||
func makeHackModeWindow(stdwin *stdReposTableWin) {
|
||||
group := stdwin.win.Top.NewGroup("This is a work in progress")
|
||||
grid := group.RawGrid()
|
||||
grid.NewButton("git pull", func() {
|
||||
log.Info("todo: run git pull on each repo")
|
||||
|
@ -187,8 +181,8 @@ func makeHackModeWindow(win *gadgets.GenericWindow) {
|
|||
_, box := makeStandardReposWindow("repos to merge from user to devel", found)
|
||||
hbox := box.Box().Horizontal()
|
||||
hbox.NewButton("merge all", func() {
|
||||
win.Disable()
|
||||
defer win.Enable()
|
||||
stdwin.win.Disable()
|
||||
defer stdwin.win.Enable()
|
||||
all := found.SortByFullPath()
|
||||
for all.Scan() {
|
||||
repo := all.Next()
|
||||
|
@ -221,26 +215,26 @@ func makeHackModeWindow(win *gadgets.GenericWindow) {
|
|||
})
|
||||
grid.NextRow()
|
||||
|
||||
group2 := win.Top.NewGroup("Merge")
|
||||
group2 := stdwin.win.Top.NewGroup("Merge")
|
||||
grid = group2.RawGrid()
|
||||
|
||||
grid.NewButton("merge to devel", func() {
|
||||
win.Disable()
|
||||
defer win.Enable()
|
||||
stdwin.win.Disable()
|
||||
defer stdwin.win.Enable()
|
||||
|
||||
mergeUserToDevel(true)
|
||||
})
|
||||
|
||||
grid.NewButton("merge to master", func() {
|
||||
win.Disable()
|
||||
defer win.Enable()
|
||||
stdwin.win.Disable()
|
||||
defer stdwin.win.Enable()
|
||||
|
||||
mergeDevelToMaster(true)
|
||||
})
|
||||
|
||||
grid.NewButton("merge all", func() {
|
||||
win.Disable()
|
||||
defer win.Enable()
|
||||
stdwin.win.Disable()
|
||||
defer stdwin.win.Enable()
|
||||
|
||||
me.argvCheckoutUser = false
|
||||
me.argvCheckoutDevel = true
|
||||
|
@ -265,7 +259,13 @@ func makeHackModeWindow(win *gadgets.GenericWindow) {
|
|||
mergeDevelToMaster(true)
|
||||
})
|
||||
|
||||
group3 := win.Top.NewGroup("work in progress")
|
||||
grid.NewButton("show dirty repos on win.Bottom", func() {
|
||||
log.Info("try to show dirty repos on bottom")
|
||||
found := findDirty()
|
||||
stdwin.doReposTable(found)
|
||||
})
|
||||
|
||||
group3 := stdwin.win.Top.NewGroup("work in progress")
|
||||
grid = group3.RawGrid()
|
||||
|
||||
grid.NewButton("forge ConfigSave()", func() {
|
||||
|
|
|
@ -35,7 +35,7 @@ func (w *stdReposTableWin) Toggle() {
|
|||
}
|
||||
|
||||
func makeWindowForPB() *gadgets.GenericWindow {
|
||||
win := gadgets.NewGenericWindow("Forge Repos Raw Protobuf View", "Filter Git Repositories")
|
||||
win := gadgets.NewGenericWindow("Forge Repos Protobuf View", "Display Git Repositories")
|
||||
|
||||
return win
|
||||
}
|
||||
|
@ -64,23 +64,17 @@ func makeReposWinNew() *gadgets.GenericWindow {
|
|||
log.Info("table has uuid", t.GetUuid())
|
||||
})
|
||||
|
||||
grid.NewButton("with patches", func() {
|
||||
grid.NewButton("to publish", func() {
|
||||
if t != nil {
|
||||
t.Delete()
|
||||
t = nil
|
||||
}
|
||||
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)
|
||||
}
|
||||
me.found = new(gitpb.Repos)
|
||||
findReposWithPatches()
|
||||
me.forge.PrintHumanTable(me.found)
|
||||
|
||||
// make the window for the first time
|
||||
t = addWindowPB(insertWin, found)
|
||||
t = addWindowPB(insertWin, me.found)
|
||||
f := func(repo *gitpb.Repo) {
|
||||
log.Info("got to ReposTable.Custom() id =", repo.GetGoPath(), repo.GetCurrentVersion())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue