Changeset 496

Show
Ignore:
Timestamp:
02/25/08 19:48:21 (9 months ago)
Author:
gbooker
Message:

Patch from Stephan again. I changed the int to a real in the info.plist and the padding was too large, so I changed it to a value that is smaller (by half), but still large enough (by examining the classdump offsets).
Refs #126

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/SapphireFrappliance/Info.plist

    r494 r496  
    2626        <real>-0.20999999999999999</real> 
    2727        <key>FRAppliancePreferedOrderValue</key> 
    28         <integer>-1</integer
     28        <real>0.0</real
    2929        <key>FRRemoteAppliance</key> 
    3030        <true/> 
  • trunk/SapphireFrappliance/SapphireAppliance.m

    r494 r496  
    122122- (id)applianceController 
    123123{ 
    124         NSLog(@"in -SapphireApplicance applianceController"); 
    125124        return ( [[[SapphireApplianceController alloc] initWithScene: nil] autorelease] ); 
    126125} 
     
    136135 */ 
    137136-(id)applianceInfo { 
    138         NSLog(@"in -SapphireApplicance applianceInfo"); 
    139          
    140137        BRApplianceInfo* p = [BRApplianceInfo infoForApplianceBundle:[NSBundle bundleForClass:[self class]]]; 
    141138        NSMutableArray *categories = [NSMutableArray array]; 
     
    146143                BRApplianceCategory *category = [BRApplianceCategory categoryWithName:[obj valueForKey:@"name"] identifier:[obj valueForKey:@"identifier"] preferredOrder:[[obj valueForKey:@"preferred-order"] floatValue]]; 
    147144                [categories addObject:category]; 
    148                 NSLog(@"asdsa"); 
    149145        } 
    150146        return [BRApplianceInfo infoForApplianceBundle:[NSBundle bundleForClass:[self class]]]; 
     
    152148 
    153149-(id)applianceCategories { 
    154         NSLog(@"in -SapphireApplicance applianceCategories"); 
    155150        NSMutableArray *categories = [NSMutableArray array]; 
    156151         
  • trunk/SapphireFrappliance/SapphireApplianceController.m

    r461 r496  
    180180        [settings setListIcon:                                  [theme gem:GEAR_GEM_KEY]]; 
    181181        [[self list] setDatasource:self]; 
    182         if([SapphireFrontRowCompat usingFrontRow]
     182        if([SapphireFrontRowCompat usingFrontRow] && ![SapphireFrontRowCompat usingTakeTwo]
    183183        { 
    184184                NSString *myBundlePath = [[NSBundle bundleForClass:[self class]] bundlePath] ; 
  • trunk/SapphireFrappliance/SapphireMediaPreview.h

    r470 r496  
    2929 */ 
    3030@interface SapphireMediaPreview : BRMetadataPreviewController{ 
     31        int             padding[16];    /*!< @brief The classes are of different sizes.  This padding prevents a class compiled with one size to overlap when used with a class of a different size*/    
    3132        SapphireMetaData                        *meta;                  /*!< @brief The metadata to display in the preview*/ 
    3233        SapphireDirectoryMetaData       *dirMeta;               /*!< @brief The directory containing the metadata*/ 
  • trunk/SapphireFrappliance/SapphireMediaPreview.m

    r470 r496  
    4141@end 
    4242 
     43/* There is no BRMetadataLayer class in ATV2.0 anymore, it seems to be BRMetadataControl now*/ 
     44/* So just do the same stuff as above, but for BRMetadataControl*/ 
     45@interface BRMetadataControl : NSObject 
     46@end 
     47 
     48@implementation BRMetadataControl (protectedAccess) 
     49        -(NSArray *)gimmieMetadataObjs { 
     50        Class klass = [self class]; 
     51        Ivar ret = class_getInstanceVariable(klass, "_metadataObjs"); 
     52        return *(NSArray * *)(((char *)self)+ret->ivar_offset); 
     53} 
     54@end 
     55 
     56 
     57@interface BRMetadataPreviewController (compat) 
     58- (void)_updateMetadataLayer; 
     59@end 
     60 
     61@interface BRMetadataPreviewController (protectedAccess) 
     62- (BRMetadataLayer *)gimmieMetadataLayer; 
     63@end 
     64 
     65@implementation BRMetadataPreviewController (protectedAccess) 
     66- (BRMetadataLayer *)gimmieMetadataLayer 
     67{ 
     68        Class myClass = [self class]; 
     69        Ivar ret = class_getInstanceVariable(myClass,"_metadataLayer"); 
     70         
     71        return *(BRMetadataLayer * *)(((char *)self)+ret->ivar_offset); 
     72} 
     73@end 
     74 
    4375@interface SapphireMediaPreview (private) 
    4476- (void)doPopulation; 
    4577- (NSString *)coverArtForPath; 
    46 @end 
    47  
    48 @interface BRMetadataPreviewController (compat) 
    49 - (void)_updateMetadataLayer; 
    50 @end 
    51  
    52 @interface BRMetadataPreviewController (protectedAccess) 
    53 - (BRMetadataLayer *)gimmieMetadataLayer; 
    54 @end 
    55  
    56 @implementation BRMetadataPreviewController (protectedAccess) 
    57 - (BRMetadataLayer *)gimmieMetadataLayer 
    58 { 
    59         Class myClass = [self class]; 
    60         Ivar ret = class_getInstanceVariable(myClass,"_metadataLayer"); 
    61          
    62         return *(BRMetadataLayer * *)(((char *)self)+ret->ivar_offset); 
    63 } 
    6478@end 
    6579