Added indeterminate ProgressBar code for Mac OS X.

This commit is contained in:
Pietro Gagliardi 2014-03-12 19:40:01 -04:00
parent 4b0315131a
commit 0e7dfc4c8a
1 changed files with 6 additions and 1 deletions

View File

@ -463,7 +463,12 @@ func (s *sysData) setProgress(percent int) {
ret := make(chan struct{})
defer close(ret)
uitask <- func() {
C.objc_msgSend_double(s.id, _setDoubleValue, C.double(percent))
if percent == -1 {
C.objc_msgSend_bool(s.id, _setIndeterminate, C.BOOL(C.YES))
} else {
C.objc_msgSend_bool(s.id, _setIndeterminate, C.BOOL(C.NO))
C.objc_msgSend_double(s.id, _setDoubleValue, C.double(percent))
}
ret <- struct{}{}
}
<-ret