blob: ea31f6ab3f793db4db1f47d9085117f3d520771b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*
Show a box for a configuration error
*/
package main
import (
"go.wit.com/log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
)
type errorBox struct {
name string // the problem name
parent *gui.Node
group *gui.Node
grid *gui.Node
l *gui.Node
b *gui.Node
something *gadgets.OneLiner
}
func NewErrorBox(p *gui.Node, name string) *errorBox {
var eb *errorBox
eb = new(errorBox)
eb.parent = p
// eb.group = p.NewGroup("eg")
// eb.grid = eb.group.NewGrid("labels", 2, 1)
eb.l = p.NewLabel("click to fix")
eb.b = p.NewButton("fix", func() {
log.Log(WARN, "should try to fix here")
})
eb.something = gadgets.NewOneLiner(eb.grid, "something")
return eb
}
func (eb *errorBox) update() bool {
return false
}
func (eb *errorBox) toggle() {
}
|