Changeset 874

Show
Ignore:
Timestamp:
08/03/2009 08:59:45 AM (3 years ago)
Author:
gbooker
Message:

Added ability to fetch all the collections which are not skipped instead of all the collections which are not hidden. Importer and Leopard File Events use non-skipped collections instead of non-hidden ones.
Fixes #292

Location:
branches/CoreData/SapphireFrappliance
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • branches/CoreData/SapphireFrappliance/FRAppliance/SapphireApplianceController.m

    r858 r874  
    501501         
    502502        BRTexture *predicateGem = [SapphireApplianceController gemForPredicate:[SapphireApplianceController predicate]]; 
    503         NSEnumerator *browserPointsEnum = [[SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc] objectEnumerator]; 
     503        NSEnumerator *browserPointsEnum = [[SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc includeHiddenOverSkipped:NO] objectEnumerator]; 
    504504        SapphireCollectionDirectory *browserPoint = nil; 
    505505        int index = 2; 
  • branches/CoreData/SapphireFrappliance/Leopard/SapphireLeopardFileEvents.m

    r558 r874  
    4646         
    4747        moc = [context retain]; 
    48         NSArray *collections = [SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc]; 
     48        NSArray *collections = [SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc includeHiddenOverSkipped:YES]; 
    4949        NSArray *paths = [collections valueForKeyPath:@"directory.path"]; 
    5050        CFAbsoluteTime latency = 3.0; /*Allowed latency in seconds */ 
  • branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.h

    r752 r874  
    99+ (SapphireCollectionDirectory *)collectionAtPath:(NSString *)path inContext:(NSManagedObjectContext *)moc; 
    1010+ (SapphireCollectionDirectory *)upgradeV1CollectionDirectory:(NSManagedObject *)oldCol toContext:(NSManagedObjectContext *)newMoc; 
    11 + (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc; 
     11+ (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc includeHiddenOverSkipped:(BOOL)hidden; 
    1212+ (NSArray *)skippedCollectionDirectoriesInContext:(NSManagedObjectContext *)moc; 
    1313+ (NSArray *)allCollectionsInContext:(NSManagedObjectContext *)moc; 
  • branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireCollectionDirectory.m

    r823 r874  
    8585} 
    8686 
    87 + (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc 
     87+ (NSArray *)availableCollectionDirectoriesInContext:(NSManagedObjectContext *)moc includeHiddenOverSkipped:(BOOL)hidden 
    8888{ 
    8989        NSFileManager *fm = [NSFileManager defaultManager]; 
     
    130130        } 
    131131         
    132         NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(hidden == NO) AND ((manualCollection == YES) OR (directory.path IN %@))", colSet]; 
     132        NSPredicate *predicate; 
     133        if(hidden) 
     134                predicate = [NSPredicate predicateWithFormat:@"(skip == NO) AND ((manualCollection == YES) OR (directory.path IN %@))", colSet]; 
     135        else 
     136                predicate = [NSPredicate predicateWithFormat:@"(hidden == NO) AND ((manualCollection == YES) OR (directory.path IN %@))", colSet]; 
    133137        NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"directory.path" ascending:YES]; 
    134138        NSArray *ret = doSortedFetchRequest(SapphireCollectionDirectoryName, moc, predicate, sort); 
  • branches/CoreData/SapphireFrappliance/MetaData/Support/SapphireMetaDataSupport.m

    r857 r874  
    533533                } 
    534534                //Set the mount values for all 
    535                 [SapphireCollectionDirectory availableCollectionDirectoriesInContext:context]; 
     535                [SapphireCollectionDirectory availableCollectionDirectoriesInContext:context includeHiddenOverSkipped:NO]; 
    536536        } 
    537537         
  • branches/CoreData/SapphireFrappliance/MetaDataImporting/SapphireImporterDataMenu.m

    r873 r874  
    223223                collectionIndex = 0; 
    224224                [collectionDirectories release]; 
    225                 collectionDirectories = [[SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc] retain]; 
     225                collectionDirectories = [[SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc includeHiddenOverSkipped:YES] retain]; 
    226226                NSArray *skipCol = [SapphireCollectionDirectory skippedCollectionDirectoriesInContext:moc]; 
    227227                [skipSet release]; 
  • branches/CoreData/SapphireFrappliance/Settings/SapphireCollectionSettings.m

    r739 r874  
    3737        moc = [context retain]; 
    3838        //Scan collections 
    39         [SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc]; 
     39        [SapphireCollectionDirectory availableCollectionDirectoriesInContext:moc includeHiddenOverSkipped:NO]; 
    4040        collections = [[SapphireCollectionDirectory allCollectionsInContext:moc] retain]; 
    4141