From ff8cd0d773640e8f60eaf827baedf8fdd9b02f95 Mon Sep 17 00:00:00 2001 From: matthewleon Date: Mon, 11 Feb 2008 09:20:52 +0000 Subject: [PATCH] Spotlight tweaks. --- Application/AppController.m | 1 + Spotlight/SpotlightSearchController.m | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/AppController.m b/Application/AppController.m index 3a15c1a9e..e0ed5b3d0 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -8,6 +8,7 @@ #import "AppleRemote.h" #import "PlaylistLoader.h" #import "OpenURLPanel.h" +#import "SpotlightWindowController.h" @implementation AppController diff --git a/Spotlight/SpotlightSearchController.m b/Spotlight/SpotlightSearchController.m index fb52fb41e..6648d96b7 100644 --- a/Spotlight/SpotlightSearchController.m +++ b/Spotlight/SpotlightSearchController.m @@ -7,7 +7,7 @@ // #import "SpotlightSearchController.h" -//#import "SpotlightWindowController.h" +#import "SpotlightWindowController.h" #import "PlaylistLoader.h" // Store a class predicate for searching for music @@ -68,12 +68,16 @@ static NSPredicate * musicOnlyPredicate = nil; - (IBAction)addToPlaylist:(id)sender; { + [self.query disableUpdates]; + NSArray *songPaths = [[playlistController selectedObjects]valueForKey:@"kMDItemPath"]; NSMutableArray *songURLs = [NSMutableArray arrayWithCapacity:[songPaths count]]; for (NSString *songPath in songPaths) { [songURLs addObject:[NSURL fileURLWithPath:songPath]]; } -// [spotlightWindowController.playlistLoader addURLs:songURLs sort:NO]; + [spotlightWindowController.playlistLoader addURLs:songURLs sort:NO]; + + [self.query enableUpdates]; } @synthesize query;