summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-03 10:02:27 -0400
committerPietro Gagliardi <[email protected]>2014-07-03 10:02:27 -0400
commit9eb9aa82c02a0276df38428895bd840ec8caea02 (patch)
tree5621f946a9eac5a7c7ee94f4f3be7990f85beb2d /window.go
parent8a81650b3da7ce00725336df9e03b38e935c5a65 (diff)
Removed uitask and made the Window creation functions only callable from the main thread. This si the first part in the real major change, which bans all concurrent use of the API and provides a Post() function for communication. I don't like this, but it's the only way. Untested.
Diffstat (limited to 'window.go')
-rw-r--r--window.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/window.go b/window.go
index 4521e33..d8375d3 100644
--- a/window.go
+++ b/window.go
@@ -71,15 +71,12 @@ func (w *Window) SetSpaced(spaced bool) {
// Open creates the Window with Create and then shows the Window with Show. As with Create, you cannot call Open more than once per window.
func (w *Window) Open(control Control) {
- uitask.createWindow(w, control, true)
+ w.Create(control)
+ w.Show()
}
// Create creates the Window, setting its control to the given control. It does not show the window. This can only be called once per window, and finalizes all initialization of the control.
func (w *Window) Create(control Control) {
- uitask.createWindow(w, control, false)
-}
-
-func (w *Window) create(control Control, show bool) {
if w.created {
panic("window already open")
}
@@ -107,9 +104,6 @@ func (w *Window) create(control Control, show bool) {
}
w.sysData.setText(w.initTitle)
w.created = true
- if show {
- w.Show()
- }
}
// Show shows the window.