[vlc-commits] [Git][videolan/vlc][master] 13 commits: macosx: Acquire all selected row indices in audio table view delegate

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue May 28 11:44:28 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b1bc2aff by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Acquire all selected row indices in audio table view delegate

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
16a73b76 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Modify selection method in audio data source to accept index set

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
6b1b6404 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Enable multiple selection for audio group selection table view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
072d5a7a by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Fetch all selected table row indices in VLCLibraryTableView menuNeedsUpdate

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
a31d272b by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Change represented object properties in library menu controller to use arrays

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
0a93a332 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Allow multiple selection in list-view mode audio group table views

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
e676bc85 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Adapt VLCLibraryMenuController play method to multiple represented objects

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
a5b902b4 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Adapt queueing in library menu controller to multiple represented objects

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
0a9b2e9c by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Adapt trashing in library menu controller to multiple represented items

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
c93b9532 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Ensure we are only displaying local-only menu items if all represented objects are local

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
215fda1d by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Enable multiple selection on album supplementary detail view table view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
ad7cad98 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Enable multiple selection in VLXLibraryAlbumTableCellView tableview

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
a44480e8 by Claudio Cambra at 2024-05-28T10:49:23+00:00
macosx: Enable multiple selection in video table view

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


11 changed files:

- modules/gui/macosx/UI/VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib
- modules/gui/macosx/UI/VLCLibraryWindow.xib
- modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
- modules/gui/macosx/library/VLCLibraryMenuController.h
- modules/gui/macosx/library/VLCLibraryMenuController.m
- modules/gui/macosx/library/VLCLibraryTableView.m
- modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.h
- modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioTableViewDelegate.m
- modules/gui/macosx/library/media-source/VLCMediaSourceCollectionViewItem.m


Changes:

=====================================
modules/gui/macosx/UI/VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib
=====================================
@@ -144,7 +144,7 @@
                                         <rect key="frame" x="0.0" y="0.0" width="699" height="198"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <subviews>
-                                            <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="50" viewBased="YES" id="eEJ-WA-0aM" customClass="VLCLibraryTableView">
+                                            <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" columnReordering="NO" autosaveColumns="NO" rowHeight="50" viewBased="YES" id="eEJ-WA-0aM" customClass="VLCLibraryTableView">
                                                 <rect key="frame" x="0.0" y="0.0" width="699" height="188"/>
                                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                                 <size key="intercellSpacing" width="3" height="2"/>


=====================================
modules/gui/macosx/UI/VLCLibraryWindow.xib
=====================================
@@ -714,7 +714,7 @@
                                 <rect key="frame" x="0.0" y="0.0" width="638" height="808"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="8M4-Y1-r6Z" customClass="VLCLibraryTableView">
+                                    <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" columnReordering="NO" autosaveColumns="NO" rowSizeStyle="automatic" viewBased="YES" id="8M4-Y1-r6Z" customClass="VLCLibraryTableView">
                                         <rect key="frame" x="0.0" y="0.0" width="638" height="808"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -934,7 +934,7 @@
                                 <rect key="frame" x="0.0" y="0.0" width="298" height="390"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" id="hvV-yD-5Kd" customClass="VLCLibraryTableView">
+                                    <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnResizing="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" id="hvV-yD-5Kd" customClass="VLCLibraryTableView">
                                         <rect key="frame" x="0.0" y="0.0" width="298" height="390"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <size key="intercellSpacing" width="17" height="0.0"/>
@@ -1028,7 +1028,7 @@
                                 <rect key="frame" x="0.0" y="0.0" width="312" height="390"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
-                                    <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" viewBased="YES" id="LNt-ot-2wU" customClass="VLCLibraryTableView">
+                                    <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" emptySelection="NO" autosaveColumns="NO" viewBased="YES" id="LNt-ot-2wU" customClass="VLCLibraryTableView">
                                         <rect key="frame" x="0.0" y="0.0" width="312" height="390"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <size key="intercellSpacing" width="3" height="2"/>


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
=====================================
@@ -290,7 +290,7 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
             _menuController = [[VLCLibraryMenuController alloc] init];
         }
 
-        [_menuController setRepresentedItem:self.representedItem];
+        [_menuController setRepresentedItems:@[self.representedItem]];
         [_menuController popupMenuWithEvent:theEvent forView:self.view];
     } else if (self.deselectWhenClickedIfSelected && 
                self.selected &&
@@ -320,7 +320,7 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
         _menuController = [[VLCLibraryMenuController alloc] init];
     }
 
-    [_menuController setRepresentedItem:self.representedItem];
+    [_menuController setRepresentedItems:@[self.representedItem]];
     [_menuController popupMenuWithEvent:theEvent forView:self.view];
 
     [super rightMouseDown:theEvent];


=====================================
modules/gui/macosx/library/VLCLibraryMenuController.h
=====================================
@@ -31,8 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
 @interface VLCLibraryMenuController : NSObject
 
 @property (readonly) NSMenu *libraryMenu;
- at property (readwrite, strong, nonatomic) VLCLibraryRepresentedItem *representedItem;
- at property (readwrite, strong, nonatomic) VLCInputItem *representedInputItem;
+ at property (readwrite, strong, nonatomic) NSArray<VLCLibraryRepresentedItem *> *representedItems;
+ at property (readwrite, strong, nonatomic) NSArray<VLCInputItem *> *representedInputItems;
 
 - (void)popupMenuWithEvent:(NSEvent *)theEvent forView:(NSView *)theView;
 


=====================================
modules/gui/macosx/library/VLCLibraryMenuController.m
=====================================
@@ -108,16 +108,23 @@
 
 - (void)updateMenuItems
 {
-    if (_representedItem != nil) {
+    if (self.representedItems != nil && self.representedItems.count > 0) {
         [self menuItems:_inputItemRequiringMenuItems setHidden:YES];
         [self menuItems:_localInputItemRequiringMenuItems setHidden:YES];
         [self menuItems:_mediaItemRequiringMenuItems setHidden:NO];
-    } else if (_representedInputItem != nil) {
+    } else if (_representedInputItems != nil && self.representedInputItems.count > 0) {
         [self menuItems:_mediaItemRequiringMenuItems setHidden:YES];
         [self menuItems:_inputItemRequiringMenuItems setHidden:NO];
 
-        [self menuItems:_localInputItemRequiringMenuItems setHidden:_representedInputItem.isStream];
-    }
+        BOOL anyStream = NO;
+        for (VLCInputItem * const inputItem in self.representedInputItems) {
+            if (inputItem.isStream) {
+                anyStream = YES;
+                break;
+            }
+        }
+        [self menuItems:_localInputItemRequiringMenuItems setHidden:anyStream];
+   }
 }
 
 - (void)popupMenuWithEvent:(NSEvent *)theEvent forView:(NSView *)theView
@@ -131,28 +138,45 @@
                playImmediately:(BOOL)playImmediately
 {
     NSParameterAssert(inputItem);
-    [VLCMain.sharedInstance.playlistController addInputItem:_representedInputItem.vlcInputItem
+    [VLCMain.sharedInstance.playlistController addInputItem:_representedInputItems.firstObject.vlcInputItem
                                                  atPosition:-1
                                               startPlayback:playImmediately];
 }
 
 - (void)play:(id)sender
 {
-    if (self.representedItem != nil) {
-        [self.representedItem play];
-    } else if (self.representedInputItem != nil) {
-        [self addInputItemToPlaylist:self.representedInputItem
+    if (self.representedItems != nil && self.representedItems.count > 0) {
+        [self.representedItems.firstObject play];
+
+        if (self.representedItems.count > 1) {
+            for (NSUInteger i = 1; i < self.representedItems.count; i++) {
+                [self.representedItems[i] queue];
+            }
+        }
+
+    } else if (self.representedInputItems != nil && self.representedInputItems.count > 0) {
+        [self addInputItemToPlaylist:self.representedInputItems.firstObject
                      playImmediately:YES];
+
+        if (self.representedInputItems.count > 1) {
+            for (NSUInteger i = 1; i < self.representedInputItems.count; i++) {
+                [self addInputItemToPlaylist:self.representedInputItems[i]
+                             playImmediately:NO];
+            }
+        }
     }
 }
 
 - (void)appendToPlaylist:(id)sender
 {
-    if (self.representedInputItem != nil) {
-        [self.representedItem queue];
-    } else if (self.representedInputItem != nil) {
-        [self addInputItemToPlaylist:self.representedInputItem
-                     playImmediately:NO];
+    if (self.representedItems != nil && self.representedItems.count > 0) {
+        for (VLCLibraryRepresentedItem * const item in self.representedItems) {
+            [item queue];
+        }
+    } else if (self.representedInputItems != nil && self.representedInputItems.count > 0) {
+        for (VLCInputItem * const inputItem in self.representedInputItems) {
+            [self addInputItemToPlaylist:inputItem playImmediately:NO];
+        }
     }
 }
 
@@ -175,19 +199,23 @@
 
 - (void)revealInFinder:(id)sender
 {
-    if (self.representedItem != nil) {
-        [self.representedItem revealInFinder];
-    } else if (_representedInputItem != nil) {
-        [_representedInputItem revealInFinder];
+    if (self.representedItems != nil && self.representedItems.count > 0) {
+        [self.representedItems.firstObject revealInFinder];
+    } else if (self.representedInputItems != nil && self.representedInputItems.count > 0) {
+        [self.representedInputItems.firstObject revealInFinder];
     }
 }
 
 - (void)moveToTrash:(id)sender
 {
-    if (self.representedItem != nil) {
-        [self.representedItem moveToTrash];
-    } else if (_representedInputItem != nil) {
-        [_representedInputItem moveToTrash];
+    if (self.representedItems != nil && self.representedItems.count > 0) {
+        for (VLCLibraryRepresentedItem * const item in self.representedItems) {
+            [item moveToTrash];
+        }
+    } else if (self.representedInputItems != nil && self.representedInputItems.count > 0) {
+        for (VLCInputItem * const inputItem in self.representedInputItems) {
+            [inputItem moveToTrash];
+        }
     }
 }
 
@@ -197,31 +225,31 @@
         _informationWindowController = [[VLCInformationWindowController alloc] init];
     }
 
-    const id<VLCMediaLibraryItemProtocol> actualItem = self.representedItem.item;
+    const id<VLCMediaLibraryItemProtocol> actualItem = self.representedItems.firstObject.item;
     if (actualItem != nil) {
         if ([actualItem isKindOfClass:VLCAbstractMediaLibraryAudioGroup.class]) {
             [_informationWindowController setRepresentedMediaLibraryAudioGroup:(VLCAbstractMediaLibraryAudioGroup *)actualItem];
         } else {
             [_informationWindowController setRepresentedInputItem:actualItem.firstMediaItem.inputItem];
         }
-    } else if (_representedInputItem != nil) {
-        _informationWindowController.representedInputItem = _representedInputItem;
+    } else if (self.representedInputItems != nil && self.representedInputItems.count > 0) {
+        _informationWindowController.representedInputItem = self.representedInputItems.firstObject;
     }
 
     [_informationWindowController toggleWindow:sender];
 }
 
-- (void)setRepresentedItem:(VLCLibraryRepresentedItem *)item
+- (void)setRepresentedItems:(NSArray<VLCLibraryRepresentedItem *> *)items
 {
-    _representedItem = item;
-    _representedInputItem = nil;
+    _representedItems = items;
+    _representedInputItems = nil;
     [self updateMenuItems];
 }
 
-- (void)setRepresentedInputItem:(VLCInputItem *)representedInputItem
+- (void)setRepresentedInputItem:(NSArray<VLCInputItem *> *)representedInputItems
 {
-    _representedInputItem = representedInputItem;
-    _representedItem = nil;
+    _representedInputItems = representedInputItems;
+    _representedItems = nil;
     [self updateMenuItems];
 }
 


=====================================
modules/gui/macosx/library/VLCLibraryTableView.m
=====================================
@@ -69,23 +69,40 @@
 
 - (void)menuNeedsUpdate:(NSMenu *)menu
 {
-    if(self.clickedRow < 0 || self.dataSource == nil || !_vlcDataSourceConforming) {
+    NSIndexSet * const indices = self.selectedRowIndexes;
+    if (indices.count == 0 || self.dataSource == nil || !_vlcDataSourceConforming) {
         return;
     }
 
     if([self.dataSource conformsToProtocol:@protocol(VLCLibraryTableViewDataSource)]) {
-        const id<VLCLibraryTableViewDataSource> vlcLibraryDataSource = (id<VLCLibraryTableViewDataSource>)self.dataSource;
-        const id<VLCMediaLibraryItemProtocol> mediaLibraryItem = [vlcLibraryDataSource libraryItemAtRow:self.clickedRow
-                                                                                           forTableView:self];
-        const VLCMediaLibraryParentGroupType parentType = vlcLibraryDataSource.currentParentType;
-        VLCLibraryRepresentedItem * const representedItem = [[VLCLibraryRepresentedItem alloc] initWithItem:mediaLibraryItem
-                                                                                                 parentType:parentType];
-        [_menuController setRepresentedItem:representedItem];
+        NSMutableArray<VLCLibraryRepresentedItem *> * const representedItems = 
+            NSMutableArray.array;
+        const id<VLCLibraryTableViewDataSource> vlcLibraryDataSource = 
+            (id<VLCLibraryTableViewDataSource>)self.dataSource;
+
+        [indices enumerateIndexesUsingBlock:^(const NSUInteger index, BOOL * const stop) {
+            const id<VLCMediaLibraryItemProtocol> mediaItem = 
+                [vlcLibraryDataSource libraryItemAtRow:index forTableView:self];
+            const VLCMediaLibraryParentGroupType parentType = 
+                vlcLibraryDataSource.currentParentType;
+            VLCLibraryRepresentedItem * const representedItem = 
+                [[VLCLibraryRepresentedItem alloc] initWithItem:mediaItem parentType:parentType];
+            [representedItems addObject:representedItem];
+        }];
+        _menuController.representedItems = representedItems;
+
     } else if (self.dataSource.class == VLCMediaSourceDataSource.class) {
-        VLCMediaSourceDataSource *mediaSourceDataSource = (VLCMediaSourceDataSource*)self.dataSource;
+        NSMutableArray<VLCInputItem *> * const mediaSourceInputItems = NSMutableArray.array;
+        VLCMediaSourceDataSource * const mediaSourceDataSource = 
+            (VLCMediaSourceDataSource*)self.dataSource;
         NSAssert(mediaSourceDataSource != nil, @"This should be a valid pointer");
-        VLCInputItem *mediaSourceInputItem = [mediaSourceDataSource mediaSourceInputItemAtRow:self.clickedRow];
-        [_menuController setRepresentedInputItem:mediaSourceInputItem];
+
+        [indices enumerateIndexesUsingBlock:^(const NSUInteger index, BOOL * const stop) {
+            VLCInputItem * const mediaSourceInputItem = 
+                [mediaSourceDataSource mediaSourceInputItemAtRow:index];
+            [mediaSourceInputItems addObject:mediaSourceInputItem];
+        }];
+        _menuController.representedInputItems = mediaSourceInputItems;
     }
 }
 


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAlbumTableCellView.m
=====================================
@@ -162,6 +162,7 @@ const CGFloat VLCLibraryAlbumTableCellViewDefaultHeight = 168.;
 {
     _tracksTableView = [[VLCLibraryTableView alloc] initWithFrame:NSZeroRect];
     _tracksTableView.identifier = VLCLibraryAlbumTableCellTableViewIdentifier;
+    _tracksTableView.allowsMultipleSelection = YES;
     _column = [[NSTableColumn alloc] initWithIdentifier:VLCLibraryAlbumTableCellTableViewColumnIdentifier];
     _column.width = [self expectedTableViewWidth];
     _column.maxWidth = MAXFLOAT;


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.h
=====================================
@@ -79,7 +79,7 @@ extern NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotif
 + (void)setupCollectionView:(NSCollectionView *)collectionView;
 - (void)setup;
 - (void)reloadData;
-- (void)tableView:(NSTableView * const)tableView selectRow:(NSInteger)row;
+- (void)tableView:(NSTableView * const)tableView selectRowIndices:(NSIndexSet * const)indices;
 
 @end
 


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioDataSource.m
=====================================
@@ -696,7 +696,7 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
     return self.displayedCollection[row];
 }
 
-- (void)tableView:(NSTableView * const)tableView selectRow:(NSInteger)row
+- (void)tableView:(NSTableView * const)tableView selectRowIndices:(NSIndexSet * const)indices
 {
     NSParameterAssert(tableView);
 
@@ -704,11 +704,11 @@ NSString * const VLCLibraryAudioDataSourceDisplayedCollectionChangedNotification
         return;
     }
 
-    if (tableView.selectedRow != row) {
-        [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
+    if (tableView.selectedRowIndexes != indices) {
+        [tableView selectRowIndexes:indices byExtendingSelection:NO];
     }
 
-    const NSInteger selectedRow = tableView.selectedRow;
+    const NSInteger selectedRow = indices.firstIndex;
     if (selectedRow >= self.displayedCollection.count) {
         return;
     }


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioTableViewDelegate.m
=====================================
@@ -117,9 +117,9 @@
 - (void)tableViewSelectionDidChange:(NSNotification *)notification
 {
     NSParameterAssert(notification);
-    NSTableView *tableView = (NSTableView *)notification.object;
+    NSTableView * const tableView = (NSTableView *)notification.object;
     NSAssert(tableView, @"Must be a valid table view");
-    NSInteger selectedRow = tableView.selectedRow;
+    NSIndexSet * const selectedIndices = tableView.selectedRowIndexes;
 
     if (![tableView.dataSource conformsToProtocol:@protocol(VLCLibraryTableViewDataSource)]) {
         return;
@@ -129,7 +129,8 @@
     NSAssert(vlcDataSource != nil, @"Should be a valid data source");
 
     if ([vlcDataSource isKindOfClass:[VLCLibraryAudioDataSource class]]) {
-        [(VLCLibraryAudioDataSource*)vlcDataSource tableView:tableView selectRow:selectedRow];
+        [(VLCLibraryAudioDataSource*)vlcDataSource tableView:tableView 
+                                            selectRowIndices:selectedIndices];
     }
 }
 


=====================================
modules/gui/macosx/library/media-source/VLCMediaSourceCollectionViewItem.m
=====================================
@@ -171,7 +171,7 @@ NSString *VLCMediaSourceCellIdentifier = @"VLCLibraryCellIdentifier";
             _menuController = [[VLCLibraryMenuController alloc] init];
         }
 
-        [_menuController setRepresentedInputItem:_representedInputItem];
+        [_menuController setRepresentedInputItems:@[_representedInputItem]];
         [_menuController popupMenuWithEvent:theEvent forView:self.view];
     }
 
@@ -184,7 +184,7 @@ NSString *VLCMediaSourceCellIdentifier = @"VLCLibraryCellIdentifier";
         _menuController = [[VLCLibraryMenuController alloc] init];
     }
 
-    [_menuController setRepresentedInputItem:_representedInputItem];
+    [_menuController setRepresentedInputItems:@[_representedInputItem]];
     [_menuController popupMenuWithEvent:theEvent forView:self.view];
 
     [super rightMouseDown:theEvent];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1bd1237704119595e9f323b343f33722a9b3438c...a44480e820f66227ff2d2d059750ab4769b198db

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1bd1237704119595e9f323b343f33722a9b3438c...a44480e820f66227ff2d2d059750ab4769b198db
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list