Search scopes no longer work but the program won't crash :)
parent
67816346e0
commit
b6a46c5ca1
|
@ -51,7 +51,8 @@ static NSPredicate * musicOnlyPredicate = nil;
|
|||
|
||||
NSValueTransformer *stringToSearchScopeTransformer = [[[StringToSearchScopeTransformer alloc]init]autorelease];
|
||||
[NSValueTransformer setValueTransformer:stringToSearchScopeTransformer forName:@"StringToSearchScopeTransformer"];
|
||||
|
||||
|
||||
[NSMetadataQuery exposeBinding:@"searchScopes"];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
|
@ -71,17 +72,6 @@ static NSPredicate * musicOnlyPredicate = nil;
|
|||
selector:@selector(compareTrackNumbers:)],
|
||||
nil];
|
||||
|
||||
// We want to bind the query's search scope to the user default that is
|
||||
// set from the NSPathControl.
|
||||
NSDictionary *bindOptions =
|
||||
[NSDictionary dictionaryWithObject:@"StringToSearchScopeTransformer"
|
||||
forKey:NSValueTransformerNameBindingOption];
|
||||
|
||||
[self.query bind:@"searchScopes"
|
||||
toObject:[NSUserDefaultsController sharedUserDefaultsController]
|
||||
withKeyPath:@"values.spotlightSearchPath"
|
||||
options:bindOptions];
|
||||
|
||||
// hook my query transformer up to me
|
||||
[PausingQueryTransformer setSearchController:self];
|
||||
}
|
||||
|
@ -247,8 +237,6 @@ static NSPredicate * musicOnlyPredicate = nil;
|
|||
self.searchString = [NSString stringWithFormat:@"%%l\"%@\"", album];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
self.query = nil;
|
||||
|
|
Loading…
Reference in New Issue