minor changes

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-18 21:00:38 -06:00
parent ae984fd85a
commit c5862d8605
1 changed files with 23 additions and 0 deletions

View File

@ -46,6 +46,7 @@ func (w *BasicWindow) Hide() {
if !w.Ready() { if !w.Ready() {
return return
} }
log.Warn("BasicWindow.Hide() here")
w.win.Hide() w.win.Hide()
w.hidden = true w.hidden = true
return return
@ -73,6 +74,26 @@ func (w *BasicWindow) Title(title string) {
return 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() // sets this window to run os.Exit()
func (w *BasicWindow) StandardExit() { func (w *BasicWindow) StandardExit() {
if !w.Ready() { 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. TODO: handle this", w.title)
log.Warn("BasicWindow.Custom() closed. handled properly?", w.title) log.Warn("BasicWindow.Custom() closed. handled properly?", w.title)
if w.Custom != nil { if w.Custom != nil {
log.Warn("BasicWindow.Custom() HAS CUSTOM")
w.Custom() w.Custom()
return
} }
w.win.StandardExit() w.win.StandardExit()
} }