diff options
| author | Jeff Carr <[email protected]> | 2024-01-18 21:00:38 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-18 21:00:38 -0600 |
| commit | c5862d86054532fa4af29e3e162575b2f4ecc1e6 (patch) | |
| tree | 997e071dab4e111979ad244ba192ce8825d81371 | |
| parent | ae984fd85a6467206997308567da2ff58bd77042 (diff) | |
minor changesv0.12.11
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | basicWindow.go | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ -74,6 +75,26 @@ func (w *BasicWindow) Title(title string) { } // 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() { return @@ -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() } |
