Changeset 3459

Show
Ignore:
Timestamp:
12/14/06 23:47:22 (2 years ago)
Author:
timothy
Message:

Fixes a crash on launch when using TOT WebKit?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Controllers/MVApplicationController.m

    r3418 r3459  
    3131#pragma mark - 
    3232 
     33@interface WebCache 
     34+ (void) setDisabled:(BOOL) disabled; 
     35@end 
     36 
     37#pragma mark - 
     38 
    3339NSString *JVChatStyleInstalledNotification = @"JVChatStyleInstalledNotification"; 
    3440NSString *JVChatEmoticonSetInstalledNotification = @"JVChatEmoticonSetInstalledNotification"; 
     
    397403        [[MVColorPanel sharedColorPanel] attachColorList:[[[NSColorList alloc] initWithName:@"Chat" fromFile:[[NSBundle mainBundle] pathForResource:@"Chat" ofType:@"clr"]] autorelease]]; 
    398404 
    399         [WebCoreCache setDisabled:[[NSUserDefaults standardUserDefaults] boolForKey:@"JVDisableWebCoreCache"]]; 
     405        if( NSClassFromString( @"WebCoreCache" ) ) 
     406                [NSClassFromString( @"WebCoreCache" ) setDisabled:[[NSUserDefaults standardUserDefaults] boolForKey:@"JVDisableWebCoreCache"]]; 
     407        else if( NSClassFromString( @"WebCache" ) ) 
     408                [NSClassFromString( @"WebCache" ) setDisabled:[[NSUserDefaults standardUserDefaults] boolForKey:@"JVDisableWebCoreCache"]]; 
    400409 
    401410        [MVChatPluginManager defaultManager]; 
  • trunk/Preferences/JVAppearancePreferences.m

    r3418 r3459  
    77#import "JVDetailCell.h" 
    88#import "NSBundleAdditions.h" 
    9  
    10 @interface WebCoreCache 
    11 + (void) empty; 
    12 @end 
    13  
    14 #pragma mark - 
    159 
    1610@interface WebView (WebViewPrivate) // WebKit 1.3 pending public API 
  • trunk/Views/JVStyleView.m

    r3431 r3459  
    1111@interface WebCoreCache 
    1212+ (void) empty; 
    13 + (id)statistics; 
     13@end 
     14 
     15#pragma mark - 
     16 
     17@interface WebCache 
     18+ (void) empty; 
    1419@end 
    1520 
     
    212217 
    213218        if( _contentFrameReady ) { 
    214                 [WebCoreCache empty]; 
     219                if( NSClassFromString( @"WebCoreCache" ) ) 
     220                        [NSClassFromString( @"WebCoreCache" ) empty]; 
     221                else if( NSClassFromString( @"WebCache" ) ) 
     222                        [NSClassFromString( @"WebCache" ) empty]; 
    215223 
    216224                NSString *styleSheetLocation = [[[self style] variantStyleSheetLocationWithName:_styleVariant] absoluteString]; 
     
    259267 
    260268        if( _contentFrameReady ) { 
    261                 [WebCoreCache empty]; 
     269                if( NSClassFromString( @"WebCoreCache" ) ) 
     270                        [NSClassFromString( @"WebCoreCache" ) empty]; 
     271                else if( NSClassFromString( @"WebCache" ) ) 
     272                        [NSClassFromString( @"WebCache" ) empty]; 
    262273 
    263274                NSString *styleSheetLocation = [[[self emoticons] styleSheetLocation] absoluteString]; 
     
    291302        _rememberScrollPosition = YES; 
    292303 
    293         [WebCoreCache empty]; 
     304        if( NSClassFromString( @"WebCoreCache" ) ) 
     305                [NSClassFromString( @"WebCoreCache" ) empty]; 
     306        else if( NSClassFromString( @"WebCache" ) ) 
     307                [NSClassFromString( @"WebCache" ) empty]; 
    294308 
    295309        [self _resetDisplay];