From b6a46c5ca1eef3b2d37d5bf21cc1de1a8803208f Mon Sep 17 00:00:00 2001 From: matthewleon Date: Mon, 18 Feb 2008 20:40:02 +0000 Subject: [PATCH] Search scopes no longer work but the program won't crash :) --- Spotlight/SpotlightWindowController.m | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Spotlight/SpotlightWindowController.m b/Spotlight/SpotlightWindowController.m index 25fb5f2ed..9fc76c138 100644 --- a/Spotlight/SpotlightWindowController.m +++ b/Spotlight/SpotlightWindowController.m @@ -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;