summaryrefslogtreecommitdiff
path: root/linuxstatus/common.go
blob: c4aea106bfaf7c6c11394f12c875d5e052c36083 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This creates a simple hello world window
package linuxstatus

import 	(
	"go.wit.com/log"
)

func (hs *LinuxStatus) Show() {
	log.Log(CHANGE, "linuxStatus.Show() window")
	hs.window.Show()
	hs.hidden = false
}

func (hs *LinuxStatus) Hide() {
	log.Log(CHANGE, "linuxStatus.Hide() window")
	hs.window.Hide()
	hs.hidden = true
}

func (hs *LinuxStatus) Toggle() {
	log.Log(CHANGE, "linuxStatus.Toggle() window")
	if hs.hidden {
		hs.window.Show()
	} else {
		hs.window.Hide()
	}
}

func (hs *LinuxStatus) Ready() bool {
	if me == nil {return false}
	if hs == nil {return false}
	if hs.window == nil {return false}
	return me.ready
}