[vlc-commits] [Git][videolan/vlc][master] macos: hide stream-only invalid actions in play queue menu

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Aug 24 09:22:50 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b92bde55 by Serhii Bykov at 2026-08-24T09:10:25+00:00
macos: hide stream-only invalid actions in play queue menu

- - - - -


1 changed file:

- modules/gui/macosx/playqueue/VLCPlayQueueMenuController.m


Changes:

=====================================
modules/gui/macosx/playqueue/VLCPlayQueueMenuController.m
=====================================
@@ -30,6 +30,7 @@
 #import "library/VLCLibraryAddToPlaylistMenuController.h"
 #import "library/VLCLibraryController.h"
 #import "library/VLCLibraryDataTypes.h"
+#import "library/VLCInputItem.h"
 #import "main/VLCMain.h"
 #import "playqueue/VLCPlayQueueController.h"
 #import "playqueue/VLCPlayQueueModel.h"
@@ -187,14 +188,35 @@
     _addToPlaylistMenuItem.enabled = mediaItems.count > 0;
 }
 
+- (void)updateStreamSpecificMenuItems
+{
+    NSIndexSet * const selectedIndexes = self.playQueueTableView.selectedRowIndexes;
+    __block BOOL hasStream = NO;
+
+    [selectedIndexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) {
+        VLCPlayQueueItem * const item =
+            [self->_playQueueController.playQueueModel playQueueItemAtIndex:idx];
+        if (item.inputItem.isStream) {
+            hasStream = YES;
+            *stop = YES;
+        }
+    }];
+
+    _informationMenuItem.hidden = hasStream;
+    _revealInFinderMenuItem.hidden = hasStream;
+}
+
 - (void)prepareForContextMenuTarget:(VLCPlayQueueContextMenuTarget)target
 {
     if (target == VLCPlayQueueContextMenuTargetRow) {
         [self updateAddToPlaylistMenuItem];
+        [self updateStreamSpecificMenuItems];
         const BOOL multipleSelection = self.playQueueTableView.selectedRowIndexes.count > 1;
         self.playQueueMenu.itemArray = multipleSelection ? self.multipleSelectionItems : self.items;
     } else {
         _addToPlaylistMenuController.representedMediaItems = nil;
+        _informationMenuItem.hidden = NO;
+        _revealInFinderMenuItem.hidden = NO;
         self.playQueueMenu.itemArray = self.backgroundItems;
     }
 }
@@ -313,6 +335,7 @@
         self.playQueueMenu.itemArray = self.items;
     }
     [self updateAddToPlaylistMenuItem];
+    [self updateStreamSpecificMenuItems];
 }
 
 @end



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b92bde55a49527b8a04afa9958dbdb3f75858b25

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b92bde55a49527b8a04afa9958dbdb3f75858b25
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list