[vlc-commits] macosx: extensions: Allow multiple selections in table view

David Fuhrmann git at videolan.org
Sun Apr 26 13:27:06 CEST 2015


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Apr 26 13:19:13 2015 +0200| [aa6b2c997c14bf4f23eb465ffe84dfb04670f0c8] | committer: David Fuhrmann

macosx: extensions: Allow multiple selections in table view

close #14464

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aa6b2c997c14bf4f23eb465ffe84dfb04670f0c8
---

 modules/gui/macosx/ExtensionsDialogProvider.m |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/ExtensionsDialogProvider.m b/modules/gui/macosx/ExtensionsDialogProvider.m
index 66e9879..d15966c 100644
--- a/modules/gui/macosx/ExtensionsDialogProvider.m
+++ b/modules/gui/macosx/ExtensionsDialogProvider.m
@@ -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



More information about the vlc-commits mailing list