Changeset 1190

Show
Ignore:
Timestamp:
02/27/2010 10:04:24 AM (2 years ago)
Author:
gbooker
Message:

Forgot to commit the updated version check code

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/SapphireFrappliance/FRAppliance/SapphireAppliance.m

    r1179 r1190  
    6666@end 
    6767 
    68 static NSString *initialError = nil; 
     68static NSString *initialMessage = nil; 
     69static NSString *initialMessageType = nil; 
    6970 
    7071@implementation SapphireAppliance 
     
    7879        SapphireLoadFramework(frameworkPath); 
    7980        if(!loadCMPFramework(myBundlePath)) 
    80                 initialError = BRLocalizedString(@"Error loading common player framework.  Continuing is not recomended", @"Error string for loading common player framework"); 
    81         else if([CMPPlayerManager version] != CMPVersion) 
    82                 initialError = BRLocalizedString(@"Common player framework is newer than expected.  You may wish to check if a newer version of Sapphire is available.  You may attempt to continue if you like.", @"Warning string for common player framework being newer than Sapphire"); 
     81        { 
     82                initialMessage = BRLocalizedString(@"Error loading common player framework.  Continuing is not recomended", @"Error string for loading common player framework"); 
     83                initialMessageType = BRLocalizedString(@"Error", @"Error"); 
     84                 
     85        } 
     86        else if([CMPPlayerManager apiVersion] != CMPAPIVersion) 
     87        { 
     88                initialMessage = BRLocalizedString(@"Common player framework is newer than expected.  You may wish to check if a newer version of Sapphire is available.  You may attempt to continue if you like.", @"Warning string for common player framework being newer than Sapphire"); 
     89                initialMessageType = BRLocalizedString(@"Warning", @"Warning"); 
     90        } 
    8391        Class cls = NSClassFromString( @"BRFeatureManager" ); 
    8492        if ( cls == Nil ) 
     
    168176- (id) applianceControllerWithScene: (id) scene 
    169177{ 
    170         if(initialError && !usingCategories) 
    171         { 
    172                 BRAlertController *controller = [SapphireFrontRowCompat alertOfType:0 titled:@"Error" primaryText:@"Framework Error" secondaryText:initialError withScene:nil]; 
    173                 initialError = nil; 
     178        if(initialMessage && !usingCategories) 
     179        { 
     180                BRAlertController *controller = [SapphireFrontRowCompat alertOfType:0 titled:initialMessageType primaryText:@"Framework Issue" secondaryText:initialMessage withScene:nil]; 
     181                initialMessage = nil; 
     182                initialMessageType = nil; 
    174183                return controller; 
    175184        } 
     
    248257-(id)controllerForIdentifier:(id)ident 
    249258{ 
    250         if(initialError) 
    251         { 
    252                 BRAlertController *controller = [SapphireFrontRowCompat alertOfType:0 titled:@"Error" primaryText:@"Framework Error" secondaryText:initialError withScene:nil]; 
    253                 initialError = nil; 
     259        if(initialMessage) 
     260        { 
     261                BRAlertController *controller = [SapphireFrontRowCompat alertOfType:0 titled:initialMessageType primaryText:@"Framework Issue" secondaryText:initialMessage withScene:nil]; 
     262                initialMessage = nil; 
     263                initialMessageType = nil; 
    254264                return controller; 
    255265        }