[vlc-commits] [Git][videolan/vlc][master] macosx: hide favorite toggle in Favorites context menu
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Tue Sep 1 17:33:28 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
784f57c9 by Serhii Bykov at 2026-09-01T19:06:58+02:00
macosx: hide favorite toggle in Favorites context menu
- - - - -
1 changed file:
- modules/gui/macosx/library/VLCLibraryMenuController.m
Changes:
=====================================
modules/gui/macosx/library/VLCLibraryMenuController.m
=====================================
@@ -32,6 +32,7 @@
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryRepresentedItem.h"
#import "library/VLCLibrarySegment.h"
+#import "library/VLCLibraryWindow.h"
#import "main/VLCMain.h"
@@ -205,6 +206,8 @@
{
VLCLibraryModel * const libraryModel = VLCMain.sharedInstance.libraryController.libraryModel;
NSArray<VLCMediaLibraryMediaItem *> * const recents = libraryModel.listOfRecentMedia;
+ const BOOL isFavoritesSegment =
+ VLCMain.sharedInstance.libraryWindow.librarySegmentType == VLCLibraryFavoritesSegmentType;
_removeFromPlaylistItem.hidden = YES;
_renamePlaylistItem.hidden = YES;
@@ -216,6 +219,7 @@
[self menuItems:_folderInputItemRequiringMenuItems setHidden:YES];
[self menuItems:_recentsMediaItemRequiringMenuItems setHidden:YES];
[self menuItems:_mediaItemRequiringMenuItems setHidden:NO];
+ self.favoriteItem.hidden = isFavoritesSegment;
return;
}
@@ -264,6 +268,7 @@
self.favoriteItem.title = anyUnfavorited ? _NS("Add to Favorites") : _NS("Remove from Favorites");
self.favoriteItem.action = anyUnfavorited ? @selector(addFavorite:) : @selector(removeFavorite:);
[self.favoriteItem vlc_setActionImageWithSystemSymbolName:(anyUnfavorited ? @"heart" : @"heart.slash")];
+ self.favoriteItem.hidden = isFavoritesSegment;
// Update delete menu item title based on whether items are file-backed
BOOL hasFileBacked = NO;
@@ -292,6 +297,7 @@
[self menuItems:_mediaItemRequiringMenuItems setHidden:YES];
_removeFromPlaylistItem.hidden = YES;
[self menuItems:_inputItemRequiringMenuItems setHidden:NO];
+ self.favoriteItem.hidden = YES;
BOOL anyStream = NO;
for (VLCInputItem * const inputItem in self.representedInputItems) {
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/784f57c971685c7939b72255c54ac3905a016397
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/784f57c971685c7939b72255c54ac3905a016397
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