From 098beef9969ae625714de4a23c5899a70a6557ca Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 26 Jun 2014 21:36:46 -0400 Subject: Added Checkbox.SetChecked() and implemented it on GTK+. --- sysdata_unix.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sysdata_unix.go') 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 +} -- cgit v1.2.3