fix panic()
This commit is contained in:
parent
9a32a7fe0b
commit
b020604931
14
doGui.go
14
doGui.go
|
@ -151,23 +151,13 @@ func drawWindow(win *gadgets.GenericWindow) {
|
||||||
insertWin = makeReposWinNew()
|
insertWin = makeReposWinNew()
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
var patchesWin *stdPatchTableWin
|
var patchesWin *stdPatchTableWin
|
||||||
gridM.NewButton("Pending patches", func() {
|
gridM.NewButton("Your patches", func() {
|
||||||
/*
|
|
||||||
defer func() {
|
|
||||||
if r := recover(); r != nil {
|
|
||||||
log.Warn("PANIC ecovered in NewButton()", r)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
*/
|
|
||||||
if patchesWin != nil {
|
if patchesWin != nil {
|
||||||
patchesWin.Toggle()
|
patchesWin.Toggle()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
me.forge.GetPatches()
|
// me.forge.GetPatches()
|
||||||
// loadUpstreamPatchsets()
|
// loadUpstreamPatchsets()
|
||||||
if me.psets == nil {
|
if me.psets == nil {
|
||||||
log.Info("failed to download current patchsets")
|
log.Info("failed to download current patchsets")
|
||||||
|
|
|
@ -76,6 +76,13 @@ func makePatchesWin(patches *forgepb.Patches) *stdPatchTableWin {
|
||||||
}
|
}
|
||||||
dwin.doPatchesTable(notdone)
|
dwin.doPatchesTable(notdone)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
grid.NewButton("Update", func() {
|
||||||
|
log.Info("TODO: run forge.GetPatches() here")
|
||||||
|
// me.forge.GetPatches()
|
||||||
|
// loadUpstreamPatchsets()
|
||||||
|
})
|
||||||
|
|
||||||
grid.NewButton("Apply All", func() {
|
grid.NewButton("Apply All", func() {
|
||||||
var count int
|
var count int
|
||||||
all := patches.SortByFilename()
|
all := patches.SortByFilename()
|
||||||
|
|
Loading…
Reference in New Issue