diff options
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -9,6 +9,7 @@ package main import ( "errors" + "fmt" "os" "runtime" "runtime/debug" @@ -51,6 +52,10 @@ func init() { me.stdout.wId = -4 me.clock.wId = -5 + Set(&me.dropdown, "default") + s := fmt.Sprintln("fake default check =", me.FakeW, "dropdown.Id", me.dropdown.Id) + me.stdout.Write([]byte(s)) + me.mouse.mouseUp = true me.mouse.clicktime = time.Millisecond * 200 me.mouse.doubletime = time.Millisecond * 400 @@ -101,7 +106,7 @@ func standardExit() { log.Log(NOW, "standardExit() doing baseGui.Close()") me.baseGui.Close() log.Log(NOW, "standardExit() doing outf.Close()") - outf.Close() + me.outf.Close() // log(true, "standardExit() setOutput(os.Stdout)") // setOutput(os.Stdout) log.Log(NOW, "standardExit() send back Quit()") @@ -116,15 +121,13 @@ func standardClose() { log.Log(NOW, "standardExit() doing baseGui.Close()") me.baseGui.Close() log.Log(NOW, "standardExit() doing outf.Close()") - outf.Close() + me.outf.Close() // os.Stdin = os.Stdin // os.Stdout = os.Stdout // os.Stderr = os.Stderr log.Log(NOW, "standardExit() send back Quit()") } -var outf *os.File - func main() { } @@ -148,16 +151,16 @@ func mainGogui() { var err error - outf, err = os.OpenFile("/tmp/captureMode.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) + me.outf, err = os.OpenFile("/tmp/captureMode.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { log.Info("error opening file:", err) os.Exit(0) } origStdout = os.Stdout - os.Stdout = outf - defer outf.Close() + os.Stdout = me.outf + defer me.outf.Close() - log.CaptureMode(outf) + log.CaptureMode(me.outf) gocuiMain() } @@ -293,7 +296,7 @@ func newWindowTrigger() { // log.Log(NOW, "newWindowTrigger() got new window", tk.cuiName) time.Sleep(200 * time.Millisecond) waitOK() - redoWindows(1, -1) + redoWindows(3, 3) if !me.stdout.init { me.stdout.init = true relocateStdoutOffscreen() |
