summaryrefslogtreecommitdiff
path: root/sysdata_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-26 21:36:46 -0400
committerPietro Gagliardi <[email protected]>2014-06-26 21:36:46 -0400
commit098beef9969ae625714de4a23c5899a70a6557ca (patch)
tree2957aad1e707be9cba02c45f7f15dce78546d2ac /sysdata_unix.go
parent5c002e3d0f0b873d6ca29dfa9e97c09dead54494 (diff)
Added Checkbox.SetChecked() and implemented it on GTK+.
Diffstat (limited to 'sysdata_unix.go')
-rw-r--r--sysdata_unix.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdata_unix.go b/sysdata_unix.go
index c7a41f0..7814fb3 100644
--- a/sysdata_unix.go
+++ b/sysdata_unix.go
@@ -410,3 +410,13 @@ func (s *sysData) center() {
}
<-ret
}
+
+func (s *sysData) setChecked(checked bool) {
+ ret := make(chan struct{})
+ defer close(ret)
+ uitask <- func() {
+ gtk_toggle_button_set_active(s.widget, checked)
+ ret <- struct{}{}
+ }
+ <-ret
+}