From c5862d86054532fa4af29e3e162575b2f4ecc1e6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 18 Jan 2024 21:00:38 -0600 Subject: [PATCH] minor changes Signed-off-by: Jeff Carr --- basicWindow.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/basicWindow.go b/basicWindow.go index cc382b8..fbc4f02 100644 --- a/basicWindow.go +++ b/basicWindow.go @@ -46,6 +46,7 @@ func (w *BasicWindow) Hide() { if !w.Ready() { return } + log.Warn("BasicWindow.Hide() here") w.win.Hide() w.hidden = true return @@ -73,6 +74,26 @@ func (w *BasicWindow) Title(title string) { return } +// sets this window to run os.Exit() +func (w *BasicWindow) StandardClose() { + if !w.Initialized() { + return + } + w.win.Custom = w.win.StandardClose + /* + log.Warn("BasicWindow.Custom() closed. TODO: handle this", w.title) + log.Warn("BasicWindow.Custom() closed. handled properly?", w.title) + if w.Custom != nil { + log.Warn("BasicWindow.Custom() HAS CUSTOM") + w.Custom() + return + } + w.win.StandardExit() + } + */ + return +} + // sets this window to run os.Exit() func (w *BasicWindow) StandardExit() { if !w.Ready() { @@ -82,7 +103,9 @@ func (w *BasicWindow) StandardExit() { log.Warn("BasicWindow.Custom() closed. TODO: handle this", w.title) log.Warn("BasicWindow.Custom() closed. handled properly?", w.title) if w.Custom != nil { + log.Warn("BasicWindow.Custom() HAS CUSTOM") w.Custom() + return } w.win.StandardExit() }