diff options
Diffstat (limited to 'sysdata_darwin.m')
| -rw-r--r-- | sysdata_darwin.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdata_darwin.m b/sysdata_darwin.m index 1119255..fc1f270 100644 --- a/sysdata_darwin.m +++ b/sysdata_darwin.m @@ -228,3 +228,13 @@ void center(id w) { [toNSWindow(w) center]; } + +void setCheckboxChecked(id checkbox, BOOL check) +{ + // -[NSButton setState:] takes a NSInteger but the state constants are NSCellStateValue which is NSUInteger (despite NSMixedState being -1); let's play it safe here + if (check) { + [toNSButton(checkbox) setState:NSOnState]; + return; + } + [toNSButton(checkbox) setState:NSOffState]; +} |
