Ignore:
Timestamp:
02/08/10 00:07:56 (2 years ago)
Author:
azawawi
Message:

Refactored OpenInFileBrowserAction? to support "Open with default System Editor" feature on KDE/GNOME unix platforms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Wx/Main.pm

    r10606 r10611  
    36673667=head3 C<on_open_with_default_system_editor> 
    36683668 
    3669     $main->on_open_with_default_system_editor; 
    3670  
    3671 Opens the current document in the default system editor 
     3669    $main->on_open_with_default_system_editor($filename); 
     3670 
     3671Opens C<$filename> in the default system editor 
    36723672 
    36733673=cut 
    36743674 
    36753675sub on_open_with_default_system_editor { 
    3676     my $self = shift; 
    3677     my $document = $self->current->document or return; 
    3678     my $filename = $document->filename; 
    3679  
    3680     unless( $filename ) { 
    3681         $self->error( Wx::gettext("No filename") ); 
    3682         return; 
    3683     } 
    3684  
    3685     if(Padre::Constant::WIN32) { 
    3686         # Win32 
    3687         require Padre::Util::Win32; 
    3688         Padre::Util::Win32::ExecuteProcessAndWait( 
    3689             directory  => $self->{cwd}, 
    3690             file       => $document->filename, 
    3691             parameters => '', 
    3692             show       => 1); 
    3693     } else { 
    3694         #TODO please implement for other platforms 
    3695         $self->error(Wx::gettext("Not implemented!")); 
    3696     } 
     3676    my ( $self, $filename ) = @_; 
     3677 
     3678    require Padre::Wx::Directory::OpenInFileBrowserAction; 
     3679    Padre::Wx::Directory::OpenInFileBrowserAction->new->open_with_default_system_editor($filename); 
    36973680} 
    36983681 
Note: See TracChangeset for help on using the changeset viewer.