Changeset 607

Show
Ignore:
Timestamp:
06/24/07 21:14:30 (1 year ago)
Author:
durin42
Message:

Now with a bit more info and a way of handling non-bundle components.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CPFPerianPrefPaneController.h

    r605 r607  
    88#define ObsoletesKey @"obsoletes" 
    99#define HumanReadableNameKey @"HumanReadableName" 
     10#define PERIAN_NO_BUNDLE_ID_FORMAT @"org.perian.No.Bundle.ID.%@" 
    1011 
    1112#define ComponentInfoDictionaryKey      @"Components" 
  • trunk/CPFPerianPrefPaneController.m

    r605 r607  
    227227                else 
    228228                        userInstalled = YES; 
    229                  
     229 
     230#warning TODO(durin42) Should filter out components that aren't installed from this list. 
    230231                componentReplacementInfo = [[NSArray alloc] initWithContentsOfFile:[[[self bundle] resourcePath] stringByAppendingPathComponent:ComponentInfoPlist]]; 
    231232        } 
     
    736737                [componentInfo setObject:@"Unknown" forKey:@"version"]; 
    737738                [componentInfo setObject:(user ? @"User" : @"System") forKey:@"installType"]; 
    738                 [componentInfo setObject:@"NO BUNDLE" forKey:@"status"]; 
    739                 [componentInfo setObject:@"NO BUNDLE" forKey:@"bundleID"]; 
     739                NSString *bundleIdent = [NSString stringWithFormat:PERIAN_NO_BUNDLE_ID_FORMAT,compName]; 
     740                [componentInfo setObject:[self checkComponentStatusByBundleIdentifier:bundleIdent] forKey:@"status"]; 
     741                [componentInfo setObject:bundleIdent forKey:@"bundleID"]; 
    740742        } 
    741743        return [componentInfo autorelease]; 
     
    767769                NSEnumerator *stringsEnum = [[infoDict objectForKey:ObsoletesKey] objectEnumerator]; 
    768770                NSString *obsoletedID; 
    769                 while ((obsoletedID = [stringsEnum nextObject])) { 
     771                while ((obsoletedID = [stringsEnum nextObject])) 
    770772                        if ([obsoletedID isEqualToString:bundleID]) 
    771773                                status = [NSString stringWithFormat:@"Obsoleted by %@",[infoDict objectForKey:HumanReadableNameKey]]; 
    772                         } 
    773774        } 
    774775        return status; 
  • trunk/Plists/ComponentInfo.plist

    r605 r607  
    1010                <key>obsoletes</key> 
    1111                <array> 
     12                        <string>com.theoryllc.FLVComponentBundle</string> 
     13                        <string>com.DivXInc.DivXDecoder</string> 
     14                        <string>com.insaneness.XVIDDelegate</string> 
     15                        <string>org.perian.No.Bundle.ID.OpenDivX</string> 
    1216                        <string>net.aldorande.component.FFusion</string> 
    1317                        <string>com.jamby.ffmpeg</string>