diff options
| author | Jeff Carr <[email protected]> | 2024-01-15 19:24:48 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-15 19:24:48 -0600 |
| commit | fdac7e7b8944d51b8207c1797edd0be9450de7b8 (patch) | |
| tree | 9e762c05ea6f716dc9434dae1e852630bd6c0ec5 /new.go | |
| parent | 94aa368cff322e667156571638a45bd3117a2739 (diff) | |
restore the files after garbage collectionv0.5.5
hopefully this actually is a valid git repo
Diffstat (limited to 'new.go')
| -rw-r--r-- | new.go | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +// This creates a simple hello world window +package linuxstatus + +import ( + "go.wit.com/log" + + "go.wit.com/gui/gadgets" +) + +func New() *LinuxStatus { + if me != nil { + log.Log(WARN, "You have done New() twice. You can only do this once") + return me + } + me = &LinuxStatus { + hidden: true, + ready: false, + } + me.ifmap = make(map[int]*IFtype) + me.ipmap = make(map[string]*IPtype) + + return me +} + +func (ls *LinuxStatus) InitWindow() { + if ! ls.Initialized() { + log.Log(WARN, "not initalized yet (no parent for the window?)") + return + } + if ls.window != nil { + log.Log(WARN, "You already have a window") + ls.ready = true + return + } + + log.Log(WARN, "Creating the Window") + ls.window = gadgets.NewBasicWindow(ls.parent, "Linux OS Details") + ls.ready = true +} |
