Changeset 5836


Ignore:
Timestamp:
07/04/09 21:27:14 (3 years ago)
Author:
azawawi
Message:

[Perl 6] Search freely in Perl 6 Help. No more * and ?.
[Perl 6] Improved the captions a bit to be more user friendly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-Perl6/lib/Padre/Plugin/Perl6/Perl6HelpDialog.pm

    r5809 r5836  
    143143    # search textbox 
    144144    my $search_label = Wx::StaticText->new( $self, -1,  
    145         Wx::gettext('&Select an item to open (? = any character, * = any string):') ); 
     145        Wx::gettext('&Type a help topic to read:') ); 
    146146    $self->_search_text( Wx::TextCtrl->new( $self, -1, '' ) ); 
    147147     
    148148    # matches result list 
    149149    my $matches_label = Wx::StaticText->new( $self, -1,  
    150         Wx::gettext('&Matching Items:') ); 
     150        Wx::gettext('&Matching Help Topics:') ); 
    151151    $self->_list( Wx::ListBox->new( $self, -1, [-1, -1], [400, 300], [],  
    152152        Wx::wxLB_SINGLE ) ); 
     
    221221 
    222222    my $search_expr = $self->_search_text->GetValue(); 
    223  
    224     #quote the search string to make it safer 
    225     #and then tranform * and ? into .* and . 
    226223    $search_expr = quotemeta $search_expr; 
    227     $search_expr =~ s/\\\*/.*?/g; 
    228     $search_expr =~ s/\\\?/./g; 
    229224 
    230225    #Populate the list box now 
     
    232227    my $pos = 0; 
    233228    foreach my $target (@{$self->_targets_index}) { 
    234         if($target =~ /^$search_expr/i) { 
     229        if($target =~ /$search_expr/i) { 
    235230            $self->_list->Insert($target, $pos, $target); 
    236231            $pos++; 
Note: See TracChangeset for help on using the changeset viewer.