Spotlight tweaks.

CQTexperiment
matthewleon 2008-02-11 09:20:52 +00:00
parent e1762b2495
commit ff8cd0d773
2 changed files with 7 additions and 2 deletions

View File

@ -8,6 +8,7 @@
#import "AppleRemote.h"
#import "PlaylistLoader.h"
#import "OpenURLPanel.h"
#import "SpotlightWindowController.h"
@implementation AppController

View File

@ -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;