summaryrefslogtreecommitdiff
path: root/cocoa
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-11-13 21:52:08 +0000
committerVincent Sanders <vince@kyllikki.org>2014-11-13 21:52:08 +0000
commit79e501075a0c301f435cf579518900e393be6fbf (patch)
tree2a75077894650e493c95d1062cc4945980985309 /cocoa
parent9fde3502b659d3858cd1978d2c6535c57efbe924 (diff)
downloadnetsurf-79e501075a0c301f435cf579518900e393be6fbf.tar.gz
netsurf-79e501075a0c301f435cf579518900e393be6fbf.tar.bz2
make the form select menu API smaller.
By hiding all but the form selection menu option structure from code outside of render this reduces the API to the absolute minimum to support this feature.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/FormSelectMenu.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/cocoa/FormSelectMenu.m b/cocoa/FormSelectMenu.m
index d1548b244..842d5108d 100644
--- a/cocoa/FormSelectMenu.m
+++ b/cocoa/FormSelectMenu.m
@@ -48,7 +48,8 @@
[menu addItemWithTitle: @"" action: NULL keyEquivalent: @""];
NSInteger currentItemIndex = 0;
- for (struct form_option *opt = control->data.select.items; opt != NULL; opt = opt->next) {
+ struct form_option *opt;
+ for (opt = form_select_get_option(control, 0); opt != NULL; opt = opt->next) {
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle: [NSString stringWithUTF8String: opt->text]
action: @selector( itemSelected: )
keyEquivalent: @""];