summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/main.go b/main.go
index 91dea02..306c674 100644
--- a/main.go
+++ b/main.go
@@ -16,7 +16,7 @@ const Xaxis = 0 // stack things horizontally
const Yaxis = 1 // stack things vertically
func init() {
- log.Log(NOW, "init() has been run")
+ log.Log(INFO, "init() has been run")
me.counter = 0
// me.prefix = "wit"
@@ -58,9 +58,9 @@ func (n *Node) findId(i int) *Node {
}
func watchCallback() {
- log.Info("guiChan() START")
+ log.Log(INFO, "guiChan() START")
for {
- log.Info("guiChan() select restarted")
+ log.Log(CHANGE, "guiChan() select restarted")
select {
case a := <-me.guiChan:
// 99.9% of events are just widget changes
@@ -133,7 +133,7 @@ func watchCallback() {
// that it doesn't matter what happens outside of here
// TODO: implement throttling someday
func (n *Node) gotUserEvent(a widget.Action) {
- log.Info("gotUserEvent() received event node =", n.id, n.progname, a.Value)
+ log.Log(CHANGE, "gotUserEvent() received event node =", n.id, n.progname, a.Value)
switch n.WidgetType {
case widget.Checkbox:
@@ -143,9 +143,9 @@ func (n *Node) gotUserEvent(a widget.Action) {
}
n.SetValue(a.Value)
- log.Info("gotUserEvent() n.Bool() =", n.Bool(), "n.String() =", n.String())
+ log.Log(CHANGE, "gotUserEvent() n.Bool() =", n.Bool(), "n.String() =", n.String())
if n.Custom == nil {
- log.Info("a Custom() function was not set for this widget")
+ log.Log(CHANGE, "a Custom() function was not set for this widget")
return
}
go n.Custom()
@@ -182,17 +182,17 @@ func (n *Node) Default() *Node {
// The window is destroyed but the application does not quit
func (n *Node) StandardClose() {
- log.Log(NOW, "wit/gui Standard Window Close. name =", n.progname)
- log.Log(NOW, "wit/gui Standard Window Close. n.Custom exit =", n.Custom)
+ log.Log(INFO, "wit/gui Standard Window Close. name =", n.progname)
+ log.Log(INFO, "wit/gui Standard Window Close. n.Custom exit =", n.Custom)
}
// The window is destroyed and the application exits
// TODO: properly exit the plugin since Quit() doesn't do it
func StandardExit() {
- log.Log(NOW, "wit/gui Standard Window Exit. running os.Exit()")
- log.Log(NOW, "StandardExit() attempt to exit each toolkit plugin")
+ log.Log(INFO, "wit/gui Standard Window Exit. running os.Exit()")
+ log.Log(INFO, "StandardExit() attempt to exit each toolkit plugin")
for i, plug := range allPlugins {
- log.Log(NOW, "NewButton()", i, plug)
+ log.Log(INFO, "NewButton()", i, plug)
}
log.Exit(0)
}
@@ -200,10 +200,10 @@ func StandardExit() {
// The window is destroyed and the application exits
// TODO: properly exit the plugin since Quit() doesn't do it
func (n *Node) StandardExit() {
- log.Log(NOW, "wit/gui Standard Window Exit. running os.Exit()")
- log.Log(NOW, "StandardExit() attempt to exit each toolkit plugin")
+ log.Log(INFO, "wit/gui Standard Window Exit. running os.Exit()")
+ log.Log(INFO, "StandardExit() attempt to exit each toolkit plugin")
for i, plug := range allPlugins {
- log.Log(NOW, "NewButton()", i, plug)
+ log.Log(INFO, "NewButton()", i, plug)
}
log.Exit(0)
}