Changeset 1835

Show
Ignore:
Timestamp:
09/10/04 13:57:29 (4 years ago)
Author:
timothy
Message:

Switching styles in the prefs no-longer flashes the display as the font preferences are changing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/JVAppearancePreferences.m

    r1823 r1835  
    116116- (void) initializeFromDefaults { 
    117117        [preview setPolicyDelegate:self]; 
     118        [preview setFrameLoadDelegate:self]; 
    118119        [preview setUIDelegate:self]; 
    119120        [optionsTable setRefusesFirstResponder:YES]; 
     
    180181        _styleOptions = [[_style styleSheetOptions] mutableCopy]; 
    181182 
     183        [[preview window] disableFlushWindow]; 
     184 
    182185        [preview setPreferencesIdentifier:[_style identifier]]; 
    183         // we shouldn't have to post this notification manually, but this seems to make webkit refresh with new prefs 
    184         [[NSNotificationCenter defaultCenter] postNotificationName:@"WebPreferencesChangedNotification" object:[preview preferences]]; 
    185186 
    186187        WebPreferences *prefs = [preview preferences]; 
     
    203204        [self updatePreview]; 
    204205        [self parseStyleOptions]; 
     206 
     207        if( [[preview window] isFlushWindowDisabled] ) 
     208                [[preview window] enableFlushWindow]; 
    205209} 
    206210 
     
    332336 
    333337        [WebCoreCache empty]; 
     338 
     339        [[preview window] disableFlushWindow]; 
    334340        [[preview mainFrame] loadHTMLString:html baseURL:nil]; 
    335341} 
     
    362368                [listener ignore]; 
    363369        } 
     370} 
     371 
     372- (void) webView:(WebView *) sender didFinishLoadForFrame:(WebFrame *) frame { 
     373        if( [[preview window] isFlushWindowDisabled] ) 
     374                [[preview window] enableFlushWindow]; 
    364375} 
    365376