Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Quicksilver/Code-QuickStepCore/QSCatalogEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
- (NSArray *)contents;
- (NSArray *)contentsScanIfNeeded:(BOOL)canScan;
- (void)setContents:(NSArray *)newContents;
- (NSArray *)enabledContents;
- (NSIndexPath *)catalogIndexPath;
- (NSMutableDictionary *)info;
- (QSCatalogEntry *)uniqueCopy;
Expand Down
9 changes: 8 additions & 1 deletion Quicksilver/Code-QuickStepCore/QSCatalogEntry.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepCore/QSComputerSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepCore/QSLibrarian.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down