code moved to autogenpb
This commit is contained in:
parent
eea1747f44
commit
9ab1afbe14
|
@ -1,9 +1,6 @@
|
||||||
package zoopb
|
package zoopb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"go.wit.com/lib/protobuf/guipb"
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -32,21 +29,13 @@ func (mt *MachinesTable) GetUuid() string {
|
||||||
return mt.pb.Uuid
|
return mt.pb.Uuid
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *MachinesTable) AddButtonFunc(title string, f func(*Machine) string) {
|
|
||||||
t.pb.Order = append(t.pb.Order, title)
|
|
||||||
|
|
||||||
sf := new(machineButtonFunc)
|
|
||||||
sf.title = title
|
|
||||||
sf.f = f
|
|
||||||
t.buttonFuncs = append(t.buttonFuncs, sf)
|
|
||||||
}
|
|
||||||
|
|
||||||
type machineButtonFunc struct {
|
type machineButtonFunc struct {
|
||||||
title string
|
title string
|
||||||
f func(*Machine) string
|
f func(*Machine) string
|
||||||
Custom func(*Machine)
|
Custom func(*Machine)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
func (mt *MachinesTable) doButtonFunc(name string) bool {
|
func (mt *MachinesTable) doButtonFunc(name string) bool {
|
||||||
for _, sf := range mt.buttonFuncs {
|
for _, sf := range mt.buttonFuncs {
|
||||||
if sf.title != name {
|
if sf.title != name {
|
||||||
|
@ -68,6 +57,7 @@ func (mt *MachinesTable) doButtonFunc(name string) bool {
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
func (it *MachinesIterator) Cur() int {
|
func (it *MachinesIterator) Cur() int {
|
||||||
return it.index
|
return it.index
|
||||||
|
|
Loading…
Reference in New Issue