summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-04-01 17:05:16 -0400
committerPietro Gagliardi <[email protected]>2014-04-01 17:05:16 -0400
commit2efda7bc39cda672dbb32ac9b9ec9740295a1dbc (patch)
tree1c0e77051beff838ac38cac871487090123ac0ea
parent7a079f1cbb9923e7e832aa0671daafc53515f4b5 (diff)
Separated initial text from sysData.make() on the Mac OS X backend, completing that set of commits.
-rw-r--r--sysdata_darwin.go9
-rw-r--r--todo.md1
2 files changed, 1 insertions, 9 deletions
diff --git a/sysdata_darwin.go b/sysdata_darwin.go
index f406095..8d56c06 100644
--- a/sysdata_darwin.go
+++ b/sysdata_darwin.go
@@ -178,7 +178,6 @@ var classTypes = [nctypes]*classData{
},
show: controlShow,
hide: controlHide,
- // TODO setText
textsel: _titleOfSelectedItem,
alttextsel: _stringValue,
append: func(id C.id, what string, alternate bool) {
@@ -301,7 +300,7 @@ func getSysData(key C.id) *sysData {
return v
}
-func (s *sysData) make(initText string, window *sysData) error {
+func (s *sysData) make(window *sysData) error {
var parentWindow C.id
ct := classTypes[s.ctype]
@@ -314,7 +313,6 @@ func (s *sysData) make(initText string, window *sysData) error {
ret <- ct.make(parentWindow, s.alternate)
}
s.id = <-ret
- s.setText(initText)
if ct.getinside != nil {
uitask <- func() {
ret <- ct.getinside(s.id)
@@ -353,11 +351,6 @@ func (s *sysData) hide() {
}
func (s *sysData) setText(text string) {
- var zeroSel C.SEL
-
- if classTypes[s.ctype].settextsel == zeroSel { // does not have concept of text
- return
- }
ret := make(chan struct{})
defer close(ret)
uitask <- func() {
diff --git a/todo.md b/todo.md
index a7301ba..ee4791a 100644
--- a/todo.md
+++ b/todo.md
@@ -18,7 +18,6 @@ so I don't forget:
- should message box text be selectable on all platforms or only on those that make it the default?
- Listbox/Combobox.Index(n)
- Index(n) is the name used by reflect.Value; use a different one?
-- change sysData.make() so it does not take the initial window text as an argument and instead have the respective Control/Window.make() call sysData.setText() expressly; this would allow me to remove the "no such concept of text" checks from the GTK+ and Mac OS X backends
- Message boxes should not show secondary text if none is specified.
- note that you can change event channels before opening the window; this allows unifying menus/toolbars/etc.
- will probably want to bring back Event() for this (but as NewEvent())