Changeset 9763

Show
Ignore:
Timestamp:
12/17/09 22:29:14 (9 months ago)
Author:
azawawi
Message:

In Open resource, path is now cleaned from slashes on win32

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Wx/Dialog/OpenResource.pm

    r9719 r9763  
    320320                        my $num_selected = scalar @matches; 
    321321                        if ( $num_selected == 1 ) { 
    322                                 $self->_status_text->ChangeValue( $self->_matches_list->GetClientData( $matches[0] ) ); 
     322                                $self->_status_text->ChangeValue( $self->_path($self->_matches_list->GetClientData( $matches[0])) ); 
    323323                                $self->_copy_button->Enable(1); 
    324324                        } elsif ( $num_selected > 1 ) { 
     
    456456        my @recent_files = (); 
    457457        foreach my $e (@$recently_used) { 
    458                 push @recent_files, $e->value; 
     458                push @recent_files,  $self->_path($e->value); 
    459459        } 
    460460        @recent_files = sort { File::Basename::fileparse($a) cmp File::Basename::fileparse($b) } @recent_files; 
     
    516516        if ( $pos > 0 ) { 
    517517                $self->_matches_list->Select(0); 
    518                 $self->_status_text->ChangeValue( $self->_matches_list->GetClientData(0) ); 
     518                $self->_status_text->ChangeValue( $self->_path($self->_matches_list->GetClientData(0)) ); 
    519519                $self->_status_text->Enable(1); 
    520520                $self->_copy_button->Enable(1); 
     
    530530} 
    531531 
     532# 
     533# Cleans a path on various platforms 
     534# 
     535sub _path { 
     536        my ($self, $path) = @_; 
     537        if(Padre::Constant::WIN32) { 
     538                $path =~ s/\//\\/g; 
     539        } 
     540        return $path; 
     541} 
    532542 
    5335431;