mamburu: Made clicking on pop-up menu items of path control inside spotlight panel work

CQTexperiment
Chris Moeller 2013-10-11 06:35:53 -07:00
parent ca0b43de0f
commit 97f6e8b472
3 changed files with 336 additions and 2225 deletions

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,8 @@
- (IBAction)addToPlaylist:(id)sender;
- (IBAction)toggleWindow:(id)sender;
- (IBAction)pathComponentClicked:(id)sender;
- (void)performSearch;
- (NSPredicate *)processSearchString;

View File

@ -283,6 +283,16 @@ static NSPredicate * musicOnlyPredicate = nil;
[self.query enableUpdates];
}
// If pop-up styled NSPathControl is set to /a/b/c path, then selecting either 'a' or 'b'
// from its pop-up menu won't do anything by default (while we'd like it to select /a and
// /a/b respectively). So here we set url of NSPathControl to be that of clicked cell.
- (IBAction)pathComponentClicked:(id)sender
{
NSPathComponentCell *pcc = [sender clickedPathComponentCell];
DLog(@"%@", pcc);
[sender setURL:[pcc URL]];
}
#pragma mark NSMetadataQuery delegate methods
// replace the NSMetadataItem with a PlaylistEntry