Skip to content
Snippets Groups Projects
Commit 667690ef authored by Claudio Cambra's avatar Claudio Cambra Committed by Jean-Baptiste Kempf
Browse files

macosx: Use weakObjectsHashTable for VLCLibraryMenuController menuitems


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent b032d3cd
No related branches found
No related tags found
1 merge request!2964macosx: Simplify VLCLibraryMenuController
Pipeline #295400 passed with stage
in 11 minutes and 21 seconds
......@@ -35,7 +35,7 @@
VLCLibraryInformationPanel *_informationPanel;
id<VLCMediaLibraryItemProtocol> _representedItem;
NSArray<NSMenuItem*> *_mediaItemRequiringMenuItems;
NSHashTable<NSMenuItem*> *_mediaItemRequiringMenuItems;
}
@end
......@@ -73,7 +73,12 @@
_libraryMenu = [[NSMenu alloc] initWithTitle:@""];
[_libraryMenu addMenuItemsFromArray:@[playItem, appendItem, revealItem, deleteItem, informationItem, [NSMenuItem separatorItem], addItem]];
_mediaItemRequiringMenuItems = @[playItem, appendItem, revealItem, deleteItem, informationItem];
_mediaItemRequiringMenuItems = [NSHashTable weakObjectsHashTable];
[_mediaItemRequiringMenuItems addObject:playItem];
[_mediaItemRequiringMenuItems addObject:appendItem];
[_mediaItemRequiringMenuItems addObject:revealItem];
[_mediaItemRequiringMenuItems addObject:deleteItem];
[_mediaItemRequiringMenuItems addObject:informationItem];
}
- (void)setMediaItemRequiringMenuItemsHidden:(BOOL)hidden
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment