Changeset 848


Ignore:
Timestamp:
11/09/08 04:09:11 (3 years ago)
Author:
szabgab
Message:

change the perl5 synaxt highlighting of the currently open buffers

Location:
trunk/lib/Padre
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Padre/Document.pm

    r847 r848  
    167167    my $self  = bless { @_ }, $class; 
    168168     
    169     if (Padre->ide->config->{ppi_highlight}) { 
    170         $MIME_LEXER{'application/x-perl'} = wxSTC_LEX_CONTAINER; 
    171     } 
    172  
    173169    # Check and derive params 
    174170    unless ( $self->editor ) { 
  • trunk/lib/Padre/Wx/MainWindow.pm

    r847 r848  
    1717use Padre::Wx::ToolBar (); 
    1818use Padre::Wx::Output  (); 
     19use Padre::Document    (); 
    1920use Padre::Documents   (); 
    2021 
     
    13431344    my $config = Padre->ide->config; 
    13441345    $config->{ppi_highlight} = $event->IsChecked ? 1 : 0; 
    1345      
     1346    $Padre::Document::MIME_LEXER{'application/x-perl'} =  
     1347        $config->{ppi_highlight} ? Wx::wxSTC_LEX_CONTAINER : Wx::wxSTC_LEX_PERL; 
     1348         
     1349    foreach my $editor ( $self->pages ) { 
     1350        #my $editor = $self->selected_editor; 
     1351        next if not $editor->{Document}->isa('Padre::Document::Perl'); 
     1352        if ($config->{ppi_highlight}) { 
     1353            $editor->{Document}->colourise; 
     1354        } else { 
     1355            $editor->{Document}->remove_color; 
     1356            $editor->Colourise(0, $editor->GetLength); 
     1357        } 
     1358    } 
     1359 
    13461360    return; 
    13471361} 
  • trunk/lib/Padre/Wx/Menu.pm

    r832 r848  
    515515        ); 
    516516        $menu->{experimental_ppi_highlight}->Check( $config->{ppi_highlight} ? 1 : 0 ); 
     517        $Padre::Document::MIME_LEXER{'application/x-perl'} =  
     518            $config->{ppi_highlight} ? Wx::wxSTC_LEX_CONTAINER : Wx::wxSTC_LEX_PERL; 
     519 
    517520    } 
    518521 
Note: See TracChangeset for help on using the changeset viewer.