Changeset 3331

Show
Ignore:
Timestamp:
08/19/06 23:30:35 (2 years ago)
Author:
timothy
Message:

Tweaks to the file search paths.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Chat Core/MVChatPluginManager.m

    r3262 r3331  
    1515 
    1616+ (NSArray *) pluginSearchPaths { 
    17         NSMutableArray *paths = [[NSMutableArray allocWithZone:nil] initWithCapacity:4]; 
    18         [paths addObject:[[NSString stringWithFormat:@"~/Library/Application Support/%@/PlugIns", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]] stringByExpandingTildeInPath]]; 
    19         [paths addObject:[NSString stringWithFormat:@"/Library/Application Support/%@/PlugIns", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]]]; 
    20         [paths addObject:[NSString stringWithFormat:@"/Network/Library/Application Support/%@/PlugIns", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]]]; 
    21         [paths addObject:[[NSBundle mainBundle] builtInPlugInsPath]]; 
     17        NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; 
     18        NSMutableArray *paths = [[NSMutableArray allocWithZone:nil] initWithCapacity:5]; 
     19        [paths addObject:[[NSString stringWithFormat:@"~/Library/Application Support/%@/PlugIns", bundleName] stringByExpandingTildeInPath]]; 
     20        [paths addObject:[NSString stringWithFormat:@"/Library/Application Support/%@/PlugIns", bundleName]]; 
     21        [paths addObject:[NSString stringWithFormat:@"/Network/Library/Application Support/%@/PlugIns", bundleName]]; 
     22        [paths addObject:[[NSBundle bundleForClass:[self class]] builtInPlugInsPath]]; 
     23        if( ! [[NSBundle mainBundle] isEqual:[NSBundle bundleForClass:[self class]]] ) 
     24                [paths addObject:[[NSBundle mainBundle] builtInPlugInsPath]]; 
    2225        return [paths autorelease]; 
    2326} 
  • trunk/Models/JVEmoticonSet.m

    r3259 r3331  
    1717        if( ! allEmoticonSets ) allEmoticonSets = [styles retain]; 
    1818 
    19         NSMutableArray *paths = [NSMutableArray arrayWithCapacity:4]; 
    20         [paths addObject:[NSString stringWithFormat:@"%@/Emoticons", [[NSBundle mainBundle] resourcePath]]]; 
    21         [paths addObject:[[NSString stringWithFormat:@"~/Library/Application Support/%@/Emoticons", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]] stringByExpandingTildeInPath]]; 
    22         [paths addObject:[NSString stringWithFormat:@"/Library/Application Support/%@/Emoticons", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]]]; 
    23         [paths addObject:[NSString stringWithFormat:@"/Network/Library/Application Support/%@/Emoticons", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]]]; 
     19        NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; 
     20        NSMutableArray *paths = [NSMutableArray arrayWithCapacity:5]; 
     21        [paths addObject:[NSString stringWithFormat:@"%@/Emoticons", [[NSBundle bundleForClass:[self class]] resourcePath]]]; 
     22        if( ! [[NSBundle mainBundle] isEqual:[NSBundle bundleForClass:[self class]]] ) 
     23                [paths addObject:[NSString stringWithFormat:@"%@/Emoticons", [[NSBundle mainBundle] resourcePath]]]; 
     24        [paths addObject:[[NSString stringWithFormat:@"~/Library/Application Support/%@/Emoticons", bundleName] stringByExpandingTildeInPath]]; 
     25        [paths addObject:[NSString stringWithFormat:@"/Library/Application Support/%@/Emoticons", bundleName]]; 
     26        [paths addObject:[NSString stringWithFormat:@"/Network/Library/Application Support/%@/Emoticons", bundleName]]; 
    2427 
    2528        NSEnumerator *enumerator = [paths objectEnumerator]; 
  • trunk/Models/JVStyle.m

    r3259 r3331  
    3434        if( ! allStyles ) allStyles = [styles retain]; 
    3535 
    36         NSMutableArray *paths = [NSMutableArray arrayWithCapacity:4]; 
    37         [paths addObject:[NSString stringWithFormat:@"%@/Styles", [[NSBundle mainBundle] resourcePath]]]; 
    38         [paths addObject:[[NSString stringWithFormat:@"~/Library/Application Support/%@/Styles", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]] stringByExpandingTildeInPath]]; 
    39         [paths addObject:[NSString stringWithFormat:@"/Library/Application Support/%@/Styles", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]]]; 
    40         [paths addObject:[NSString stringWithFormat:@"/Network/Library/Application Support/%@/Styles", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]]]; 
     36        NSString *bundleName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; 
     37        NSMutableArray *paths = [NSMutableArray arrayWithCapacity:5]; 
     38        [paths addObject:[NSString stringWithFormat:@"%@/Styles", [[NSBundle bundleForClass:[self class]] resourcePath]]]; 
     39        if( ! [[NSBundle mainBundle] isEqual:[NSBundle bundleForClass:[self class]]] ) 
     40                [paths addObject:[NSString stringWithFormat:@"%@/Styles", [[NSBundle mainBundle] resourcePath]]]; 
     41        [paths addObject:[[NSString stringWithFormat:@"~/Library/Application Support/%@/Styles", bundleName] stringByExpandingTildeInPath]]; 
     42        [paths addObject:[NSString stringWithFormat:@"/Library/Application Support/%@/Styles", bundleName]]; 
     43        [paths addObject:[NSString stringWithFormat:@"/Network/Library/Application Support/%@/Styles", bundleName]]; 
    4144 
    4245        NSEnumerator *enumerator = [paths objectEnumerator];