summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basicWindow.go23
1 files changed, 14 insertions, 9 deletions
diff --git a/basicWindow.go b/basicWindow.go
index 81f6d72..58c30cd 100644
--- a/basicWindow.go
+++ b/basicWindow.go
@@ -14,17 +14,27 @@ type BasicWindow struct {
vertical bool
title string
- parent *gui.Node
+ // parent *gui.Node
win *gui.Node // window widget
box *gui.Node // box
Custom func()
}
+func RawBasicWindow(title string) *BasicWindow {
+ var w *BasicWindow
+ w = &BasicWindow{
+ title: title,
+ vertical: false,
+ }
+ log.Log(GADGETS, "NewBasicWindow() END")
+
+ return w
+}
+
func NewBasicWindow(parent *gui.Node, title string) *BasicWindow {
var w *BasicWindow
w = &BasicWindow{
- parent: parent,
title: title,
vertical: false,
}
@@ -118,9 +128,6 @@ func (w *BasicWindow) Initialized() bool {
if w == nil {
return false
}
- if w.parent == nil {
- return false
- }
return true
}
@@ -129,9 +136,6 @@ func (w *BasicWindow) Ready() bool {
if !w.Initialized() {
return false
}
- if !w.parent.Ready() {
- return false
- }
return w.ready
}
@@ -165,7 +169,8 @@ func (w *BasicWindow) Make() {
log.Log(GADGETS, "BasicWindow.Make() window was already created")
return
}
- w.win = w.parent.RawWindow(w.title)
+ // w.win = w.parent.RawWindow(w.title)
+ w.win = gui.RawWindow(w.title)
// if Custom isn't set, set it here. This prevents the application from
// os.Exit() if the window is closed. It destroy's the widgets in the toolkit plugins