Ticket #1447: Main.pm.patch

File Main.pm.patch, 1.7 KB (added by bowtie, 2 years ago)
  • usr/src/Padre/Padre/lib/Padre/Wx/Main.pm

     
    29502950            # tome 
    29512951            my $pwd = $self->current->document->project_dir(); 
    29522952            $cmd =~ s/"/\\"/g; 
     2953 
    29532954            # Applescript can throw spurious errors on STDERR: http://helpx.adobe.com/photoshop/kb/unit-type-conversion-error-applescript.html 
    2954             system qq(osascript -e 'tell app "Terminal"\n\tdo script "cd $pwd; clear; $cmd;"\nend tell'\n);  
    2955      
     2955            system qq(osascript -e 'tell app "Terminal"\n\tdo script "cd $pwd; clear; $cmd;"\nend tell'\n); 
     2956 
    29562957        } else { 
    29572958            system qq(xterm -sb -e "$cmd; sleep 1000" &); 
    29582959        } 
     
    45884589    # Capture where we are in the document 
    45894590    my $line = $editor->LineFromPosition( $editor->GetCurrentPos ); 
    45904591 
     4592    #if file dose not exsit close the tab 
     4593    print "processing file called $document->{filename}\n"; 
     4594    unless ( -e $document->{filename} ) { 
     4595        my @labels = $self->current->notebook->labels; 
     4596        for ( 0 .. $#labels ) { 
     4597 
     4598            # find tab index and delete tab 
     4599            if ( $labels[$_][1] eq $document->{filename} ) { 
     4600                print "file names $labels[$_][1]\n"; 
     4601                print "tab index $_\n"; 
     4602 
     4603                $self->delete($_); 
     4604                # $self->notebook->DeletePage($_); 
     4605            } 
     4606        } 
     4607 
     4608        print "did we delete file\n"; 
     4609    } 
     4610 
    45914611    # Reload the document and propogate to the editor 
    45924612    unless ( $document->reload ) { 
    45934613        $self->error( 
     
    45984618        ); 
    45994619        return 0; 
    46004620    } 
     4621 
    46014622    $editor->set_document($document); 
    46024623 
    46034624    # Restore the line position 
     
    46144635        return; 
    46154636    } 
    46164637 
     4638 
    46174639    # Refresh the editor title to remove any unsaved marker 
    46184640    $editor->refresh_notebook; 
    46194641