summaryrefslogtreecommitdiff
path: root/sysdata_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-16 18:41:29 -0500
committerPietro Gagliardi <[email protected]>2014-02-16 18:41:29 -0500
commit4fc3cb1d0055706c4d62d61a165779a71e6fa2fd (patch)
tree9deabe1f85ff7b97fc6233c8f27c77247b06a785 /sysdata_unix.go
parentb8f7f4aa6e7d0761c731c1f116b7b8f7a8c19b9a (diff)
Added Checkbox to GTK+. Also added a TODO about crashes.
Diffstat (limited to 'sysdata_unix.go')
-rw-r--r--sysdata_unix.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdata_unix.go b/sysdata_unix.go
index bf6ce49..f2aef50 100644
--- a/sysdata_unix.go
+++ b/sysdata_unix.go
@@ -65,6 +65,8 @@ var classTypes = [nctypes]*classData{
},
},
c_checkbox: &classData{
+ make: gtk_check_button_new,
+ setText: gtk_button_set_label,
},
c_combobox: &classData{
},
@@ -165,8 +167,12 @@ if classTypes[s.ctype] == nil || classTypes[s.ctype].setText == nil { return nil
}
func (s *sysData) isChecked() bool {
- // TODO
- return false
+ ret := make(chan bool)
+ defer close(ret)
+ uitask <- func() {
+ ret <- gtk_toggle_button_get_active(s.widget)
+ }
+ return <-ret
}
func (s *sysData) text() string {