Commit a8fe1c1d authored by David Fuhrmann's avatar David Fuhrmann Committed by Jean-Baptiste Kempf

macosx: extensions: Allow multiple selections in table view

close #14464

(cherry picked from commit aa6b2c997c14bf4f23eb465ffe84dfb04670f0c8)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3870cf32
......@@ -111,6 +111,7 @@ static NSView *createControlFromWidget(extension_widget_t *widget, id self)
VLCDialogList *list = [[VLCDialogList alloc] init];
[list setUsesAlternatingRowBackgroundColors:YES];
[list setHeaderView:nil];
[list setAllowsMultipleSelection:YES];
[scrollView setDocumentView:list];
[scrollView setAutoresizingMask:NSViewHeightSizable | NSViewWidthSizable];
......@@ -366,8 +367,9 @@ static ExtensionsDialogProvider *_o_sharedInstance = nil;
struct extension_widget_value_t *value;
unsigned i = 0;
NSIndexSet *selectedIndexes = [list selectedRowIndexes];
for (value = [list widget]->p_values; value != NULL; value = value->p_next, i++)
value->b_selected = (i == [list selectedRow]);
value->b_selected = (YES == [selectedIndexes containsIndex:i]);
}
- (void)popUpSelectionChanged:(id)sender
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment