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

macosx: Finally add functional breadcrumb interaction


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent f04725c3
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)setupViews;
- (void)reloadViews;
- (void)homeButtonAction:(id)sender;
- (void)pathControlAction:(id)sender;
- (void)setGridOrListMode:(id)sender;
@end
......
......@@ -102,6 +102,8 @@ NSString *VLCMediaSourceTableViewCellIdentifier = @"VLCMediaSourceTableViewCellI
self.homeButton.action = @selector(homeButtonAction:);
self.homeButton.target = self;
[self.pathControl clearInputNodePathControlItems];
self.pathControl.action = @selector(pathControlAction:);
self.pathControl.target = self;
self.tableView.dataSource = self;
self.tableView.delegate = self;
......@@ -444,6 +446,21 @@ referenceSizeForHeaderInSection:(NSInteger)section
[mainNavStack clear];
}
- (void)pathControlAction:(id)sender
{
if (_pathControl.clickedPathItem == nil || _childDataSource == nil) {
return;
}
NSPathControlItem *selectedItem = _pathControl.clickedPathItem;
NSString *itemNodeMrl = selectedItem.image.name;
VLCInputNodePathControlItem *matchingItem = [_pathControl.inputNodePathControlItems objectForKey:itemNodeMrl];
if (matchingItem != nil) {
_childDataSource.nodeToDisplay = matchingItem.inputNode;
}
}
- (void)setCurrentViewMode
{
if (_gridViewMode) {
......
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