Ticket #126: next_step.patch

File next_step.patch, 4.4 kB (added by Stephan, 9 months ago)

Changes in Info.plist (PrefferedThing?=0), removed debug outputs, fixes SapphireMediaPreview? and SapphireApplicanceController? (to see this, you've to remove allImporter in SapphireApplianceController::recreateMenu)

  • SapphireFrappliance/SapphireAppliance.m

    old new  
    121121 
    122122- (id)applianceController 
    123123{ 
    124         NSLog(@"in -SapphireApplicance applianceController"); 
    125124        return ( [[[SapphireApplianceController alloc] initWithScene: nil] autorelease] ); 
    126125} 
    127126 
     
    135134 * This implements the BRAppliance protocol from ATV2. 
    136135 */ 
    137136-(id)applianceInfo { 
    138         NSLog(@"in -SapphireApplicance applianceInfo"); 
    139          
    140137        BRApplianceInfo* p = [BRApplianceInfo infoForApplianceBundle:[NSBundle bundleForClass:[self class]]]; 
    141138        NSMutableArray *categories = [NSMutableArray array]; 
    142139         
     
    145142        while((obj = [enumerator nextObject]) != nil) { 
    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]]]; 
    151147} 
    152148 
    153149-(id)applianceCategories { 
    154         NSLog(@"in -SapphireApplicance applianceCategories"); 
    155150        NSMutableArray *categories = [NSMutableArray array]; 
    156151         
    157152        NSEnumerator *enumerator = [[[self applianceInfo] applianceCategoryDescriptors] objectEnumerator]; 
  • SapphireFrappliance/SapphireMediaPreview.h

    old new  
    2828 * The directory may not always be the parent of the metadata. In the case of virtual directories, the parent is a virtual directory while the metadata is the actual file located elsewhere. 
    2929 */ 
    3030@interface SapphireMediaPreview : BRMetadataPreviewController{ 
     31        char padding[128]; 
    3132        SapphireMetaData                        *meta;                  /*!< @brief The metadata to display in the preview*/ 
    3233        SapphireDirectoryMetaData       *dirMeta;               /*!< @brief The directory containing the metadata*/ 
    3334} 
  • SapphireFrappliance/SapphireMediaPreview.m

    old new  
    4040} 
    4141@end 
    4242 
    43 @interface SapphireMediaPreview (private) 
    44 - (void)doPopulation; 
    45 - (NSString *)coverArtForPath; 
     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 
    4646@end 
    4747 
     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 
    4857@interface BRMetadataPreviewController (compat) 
    4958- (void)_updateMetadataLayer; 
    5059@end 
     
    6372} 
    6473@end 
    6574 
     75@interface SapphireMediaPreview (private) 
     76- (void)doPopulation; 
     77- (NSString *)coverArtForPath; 
     78@end 
     79 
    6680@implementation SapphireMediaPreview 
    6781 
    6882/*List of extensions to look for cover art*/ 
  • SapphireFrappliance/Info.plist

    old new  
    2525        <key>FRApplianceIconReflectionOffset</key> 
    2626        <real>-0.20999999999999999</real> 
    2727        <key>FRAppliancePreferedOrderValue</key> 
    28         <integer>-1</integer> 
     28        <integer>0</integer> 
    2929        <key>FRRemoteAppliance</key> 
    3030        <true/> 
    3131        <key>NSPrincipalClass</key> 
  • SapphireFrappliance/SapphireApplianceController.m

    old new  
    179179        [settings setListTitle:                                 BRLocalizedString(@" Settings", @"Settings Menu Item")] ; 
    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] ; 
    185185                NSString *onlyPath = [myBundlePath stringByAppendingPathComponent:@"/Contents/Frameworks/LeopardOnly.framework"];