diff --git a/Quicksilver/Code-QuickStepCore/QSCatalogEntry.h b/Quicksilver/Code-QuickStepCore/QSCatalogEntry.h index 7fd78c952..fd9f2495d 100644 --- a/Quicksilver/Code-QuickStepCore/QSCatalogEntry.h +++ b/Quicksilver/Code-QuickStepCore/QSCatalogEntry.h @@ -68,6 +68,7 @@ - (NSArray *)contents; - (NSArray *)contentsScanIfNeeded:(BOOL)canScan; - (void)setContents:(NSArray *)newContents; +- (NSArray *)enabledContents; - (NSIndexPath *)catalogIndexPath; - (NSMutableDictionary *)info; - (QSCatalogEntry *)uniqueCopy; diff --git a/Quicksilver/Code-QuickStepCore/QSCatalogEntry.m b/Quicksilver/Code-QuickStepCore/QSCatalogEntry.m index e9c1b3c32..d6ee4300d 100644 --- a/Quicksilver/Code-QuickStepCore/QSCatalogEntry.m +++ b/Quicksilver/Code-QuickStepCore/QSCatalogEntry.m @@ -401,7 +401,7 @@ - (NSUInteger)deepObjectCount { NSArray *leaves = [self deepChildrenWithGroups:NO leaves:YES disabled:NO]; NSUInteger i, count = 0; for (i = 0; i < [leaves count]; i++) - count += [(NSArray *)[[leaves objectAtIndex:i] contents] count]; + count += [(NSArray *)[[leaves objectAtIndex:i] enabledContents] count]; return count; } @@ -612,6 +612,13 @@ - (NSArray *)contentsScanIfNeeded:(BOOL)canScan { } } +- (NSArray *)enabledContents +{ + NSIndexSet *enabled = [[self contents] indexesOfObjectsWithOptions:NSEnumerationConcurrent passingTest:^BOOL(QSObject *obj, NSUInteger idx, BOOL *stop) { + return ![QSLib itemIsOmitted:obj]; + }]; + return [[self contents] objectsAtIndexes:enabled]; +} - (QSCatalogEntry *)uniqueCopy { NSMutableDictionary *newDictionary = [info mutableCopy]; diff --git a/Quicksilver/Code-QuickStepCore/QSComputerSource.m b/Quicksilver/Code-QuickStepCore/QSComputerSource.m index c2c4c46c0..f080b3018 100644 --- a/Quicksilver/Code-QuickStepCore/QSComputerSource.m +++ b/Quicksilver/Code-QuickStepCore/QSComputerSource.m @@ -16,7 +16,7 @@ - (NSString*)detailsOfObject:(QSObject*)object { - (BOOL)loadChildrenForObject:(QSObject*)proxy { if ([[proxy identifier] isEqualToString:@"QSComputerProxy"]) { - [proxy setChildren:[[[QSLibrarian sharedInstance] entryForID:@"QSPresetVolumes"] contents]]; + [proxy setChildren:[[QSLib entryForID:@"QSPresetVolumes"] enabledContents]]; return YES; } return NO; diff --git a/Quicksilver/Code-QuickStepCore/QSLibrarian.m b/Quicksilver/Code-QuickStepCore/QSLibrarian.m index 7b43beeac..0819f6705 100644 --- a/Quicksilver/Code-QuickStepCore/QSLibrarian.m +++ b/Quicksilver/Code-QuickStepCore/QSLibrarian.m @@ -435,7 +435,7 @@ - (void)recalculateTypeArraysForItem:(QSCatalogEntry *)entry { //NSDate *date = [NSDate date]; NSString *currentItemID = [entry identifier]; - NSDictionary *typeDictionary = [self typeArraysFromArray:[entry contents]]; + NSDictionary *typeDictionary = [self typeArraysFromArray:[entry enabledContents]]; //NSLog(@"%@", [typeDictionary allKeys]); NSArray *typeKeys = [typeDictionary allKeys]; diff --git a/Quicksilver/PlugIns-Main/QSCorePlugIn/Code/QSCatalogEntrySource.m b/Quicksilver/PlugIns-Main/QSCorePlugIn/Code/QSCatalogEntrySource.m index 53c39e902..c8c6966f9 100644 --- a/Quicksilver/PlugIns-Main/QSCorePlugIn/Code/QSCatalogEntrySource.m +++ b/Quicksilver/PlugIns-Main/QSCorePlugIn/Code/QSCatalogEntrySource.m @@ -110,9 +110,9 @@ - (NSArray *)childrenForObject:(QSBasicObject *)object { QSCatalogEntry *theEntry = [[QSLibrarian sharedInstance] entryForID:[object objectForType:QSCatalogEntryPboardType]]; if ([theEntry isGroup]) - return [self objectsFromCatalogEntries:[theEntry contents]]; + return [self objectsFromCatalogEntries:[theEntry enabledContents]]; else - return [theEntry contentsScanIfNeeded:YES]; + return [theEntry enabledContents]; } // Action Provider Methods