Changeset 4572


Ignore:
Timestamp:
12/27/09 14:19:57 (10 years ago)
Author:
ronosman
Message:

Reset layout when pLoader changes image cache version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/wxApp.pm

    r4569 r4572  
    182182 
    183183    $self->_read_default_user_properties( 'properties.ini' ) ; 
    184          
    185     # when language is switched, need a new layout 
    186     unlink $self->layout_file if $self->layout_clean; 
    187     $self->layout_clean(0); 
    188  
    189     my $layout = retrieve $self->layout_file if -e $self->layout_file;   
    190     if(defined $layout ){ 
    191         $self->SetKeyValues($layout); 
    192     } 
    193  
    194184 
    195185    $self->site_url( 
     
    236226        $self->_init_imagelist; 
    237227        $self->_init_thumbimagelist; 
     228        $self->_set_stored_layout; 
    238229        $self->_init_frame; 
    239230    } 
    240231 
    241232    $not_exit; 
     233} 
     234 
     235sub _set_stored_layout { 
     236    my ( $self ) = @_; 
     237 
     238 
     239    # when language is switched, need a new layout 
     240    unlink $self->layout_file if $self->layout_clean; 
     241    $self->layout_clean(0); 
     242 
     243    my $layout = retrieve $self->layout_file if -e $self->layout_file;   
     244    if(defined $layout ){ 
     245        $self->SetKeyValues($layout); 
     246    } 
     247 
    242248} 
    243249 
     
    476482            $use_new_imagelist = 1 unless $self->imagelist_version eq $stored_imagelist->{imagelist_version}; 
    477483            if($use_new_imagelist){ 
    478                 Wx::LogMessage(gettext("pLoader has to reset image cache.")); 
     484                Wx::LogMessage(gettext("pLoader has to reset image cache.")); 
     485                # and silently clean layout 
     486                $self->layout_clean(1); 
    479487            } 
    480488        } 
Note: See TracChangeset for help on using the changeset viewer.