2024-01-06 05:24:11 -06:00
|
|
|
// This creates a simple hello world window
|
|
|
|
package linuxstatus
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/log"
|
|
|
|
)
|
|
|
|
|
2024-01-06 05:55:51 -06:00
|
|
|
func (ls *LinuxStatus) Show() {
|
2024-01-06 05:24:11 -06:00
|
|
|
log.Log(CHANGE, "linuxStatus.Show() window")
|
2024-01-06 05:55:51 -06:00
|
|
|
ls.window.Show()
|
|
|
|
ls.hidden = false
|
2024-01-06 05:24:11 -06:00
|
|
|
}
|
|
|
|
|
2024-01-06 05:55:51 -06:00
|
|
|
func (ls *LinuxStatus) Hide() {
|
2024-01-06 05:24:11 -06:00
|
|
|
log.Log(CHANGE, "linuxStatus.Hide() window")
|
2024-01-06 05:55:51 -06:00
|
|
|
ls.window.Hide()
|
|
|
|
ls.hidden = true
|
2024-01-06 05:24:11 -06:00
|
|
|
}
|
|
|
|
|
2024-01-06 05:55:51 -06:00
|
|
|
func (ls *LinuxStatus) Toggle() {
|
2024-01-06 05:24:11 -06:00
|
|
|
log.Log(CHANGE, "linuxStatus.Toggle() window")
|
2024-01-06 05:55:51 -06:00
|
|
|
if ls.hidden {
|
|
|
|
ls.window.Show()
|
2024-01-06 05:24:11 -06:00
|
|
|
} else {
|
2024-01-06 05:55:51 -06:00
|
|
|
ls.window.Hide()
|
2024-01-06 05:24:11 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-06 05:55:51 -06:00
|
|
|
func (ls *LinuxStatus) Ready() bool {
|
2024-01-06 05:24:11 -06:00
|
|
|
if me == nil {return false}
|
2024-01-06 05:55:51 -06:00
|
|
|
if ls == nil {return false}
|
|
|
|
if ls.window == nil {return false}
|
2024-01-06 05:24:11 -06:00
|
|
|
return me.ready
|
|
|
|
}
|
2024-01-06 05:55:51 -06:00
|
|
|
|
|
|
|
func (ls *LinuxStatus) Initialized() bool {
|
|
|
|
if me == nil {return false}
|
|
|
|
if ls == nil {return false}
|
|
|
|
if ls.parent == nil {return false}
|
|
|
|
return true
|
|
|
|
}
|