[vlc-commits] [Git][videolan/vlc][master] 3 commits: macosx: Select artists view when clicking on music sidebar entry, making music...

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Mar 11 18:11:12 UTC 2024



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
57e236ad by Claudio Cambra at 2024-03-11T17:53:06+00:00
macosx: Select artists view when clicking on music sidebar entry, making music sidebar entry unselectable

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

- - - - -
99a81772 by Claudio Cambra at 2024-03-11T17:53:06+00:00
macosx: Expand music sidebar entry when it is clicked

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

- - - - -
b2310729 by Claudio Cambra at 2024-03-11T17:53:06+00:00
macosx: Enforce set outlineview in outlineviewdelegate selectionIndexesForProposedSelection

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

- - - - -


1 changed file:

- modules/gui/macosx/library/VLCLibraryWindowNavigationSidebarController.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryWindowNavigationSidebarController.m
=====================================
@@ -100,6 +100,19 @@ static NSString * const VLCLibrarySegmentCellIdentifier = @"VLCLibrarySegmentCel
     return cellView;
 }
 
+- (NSIndexSet *)outlineView:(NSOutlineView *)outlineView selectionIndexesForProposedSelection:(nonnull NSIndexSet *)proposedSelectionIndexes
+{
+    NSAssert(outlineView == _outlineView, @"VLCLibraryWindowNavigationSidebarController should only be a delegate for the libraryWindow nav sidebar outline view!");
+
+    if (proposedSelectionIndexes.count == 0 || proposedSelectionIndexes.firstIndex != VLCLibraryMusicSegment) {
+        return proposedSelectionIndexes;
+    } else {
+        NSTreeNode * const itemNode = (NSTreeNode *)[_outlineView itemAtRow:VLCLibraryMusicSegment];
+        [self.outlineView expandItem:itemNode];
+        return [NSIndexSet indexSetWithIndex:VLCLibraryArtistsMusicSubSegment];
+    }
+}
+
 - (void)outlineViewSelectionDidChange:(NSNotification *)notification
 {
     NSTreeNode * const node = (NSTreeNode *)[_outlineView itemAtRow:_outlineView.selectedRow];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3ba89ea810a56279d0740df470f612a81fc5abc5...b2310729634650d8cf67cd2b4746bbb80083e068

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3ba89ea810a56279d0740df470f612a81fc5abc5...b2310729634650d8cf67cd2b4746bbb80083e068
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