diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-02 16:46:27 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-02 16:46:27 -0500 |
| commit | db1c6c5c17efa0aa160de1bdf8193f984197f658 (patch) | |
| tree | 08d32e45faf1784f3d1498dab8d52dcfb76185f6 /sysdata_darwin.go | |
| parent | 3279f4f43a195c1dab8e20801553ec8a229f2b24 (diff) | |
Added an alternate textsel for Mac OS X Comboboxes.
Diffstat (limited to 'sysdata_darwin.go')
| -rw-r--r-- | sysdata_darwin.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdata_darwin.go b/sysdata_darwin.go index 980a01f..8966324 100644 --- a/sysdata_darwin.go +++ b/sysdata_darwin.go @@ -23,6 +23,7 @@ type classData struct { hide func(what C.id) settextsel C.SEL textsel C.SEL + alttextsel C.SEL } var ( @@ -245,10 +246,14 @@ if classTypes[s.ctype].make == nil { return false } func (s *sysData) text() string { var zero C.SEL if classTypes[s.ctype].textsel == zero { return "" } + sel := classTypes[s.ctype].textsel + if s.alternate { + sel = classTypes[s.ctype].alttextsel + } ret := make(chan string) defer close(ret) uitask <- func() { - str := C.objc_msgSend_noargs(s.id, classTypes[s.ctype].textsel) + str := C.objc_msgSend_noargs(s.id, sel) ret <- fromNSString(str) } return <-ret |
