Changeset 10612
- Timestamp:
- 02/08/10 00:13:24 (7 months ago)
- Location:
- trunk/Padre/lib/Padre
- Files:
-
- 5 modified
-
Action/File.pm (modified) (1 diff)
-
Document.pm (modified) (1 diff)
-
Document/Perl.pm (modified) (1 diff)
-
Wx/Directory/OpenInFileBrowserAction.pm (modified) (6 diffs)
-
Wx/Main.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Action/File.pm
r10611 r10612 127 127 128 128 Padre::Action->new( 129 name => 'file.open_with_default_system_editor',130 label => Wx::gettext('Open with Default System Editor'),129 name => 'file.open_with_default_system_editor', 130 label => Wx::gettext('Open with Default System Editor'), 131 131 need_editor => 1, 132 132 need_file => 1, 133 comment => Wx::gettext('Opens the file with the default system editor'),134 menu_event => sub {133 comment => Wx::gettext('Opens the file with the default system editor'), 134 menu_event => sub { 135 135 my $document = $_[0]->current->document or return; 136 136 $_[0]->on_open_with_default_system_editor( $document->filename ); -
trunk/Padre/lib/Padre/Document.pm
r10608 r10612 222 222 $self->{filename} = $self->{file}->{filename}; 223 223 224 # TODO: Fix Ticket #845 here. We need to make sure only the filename and not the folder name is here.225 # This causes F5 to fail as the get_command in Document::Perl doesn' handle this corretly 224 # TODO: Fix Ticket #845 here. We need to make sure only the filename and not the folder name is here. 225 # This causes F5 to fail as the get_command in Document::Perl doesn' handle this corretly 226 226 227 227 if ( $self->{file}->exists ) { -
trunk/Padre/lib/Padre/Document/Perl.pm
r10607 r10612 319 319 my $dir = File::Basename::dirname($filename); 320 320 chdir $dir; 321 321 322 322 return $debug 323 323 ? qq{"$perl" -Mdiagnostics(-traceonly) $run_args{interpreter} "$filename"$Script_Args} -
trunk/Padre/lib/Padre/Wx/Directory/OpenInFileBrowserAction.pm
r10611 r10612 30 30 # On Windows, if we don't have STDIN/STDOUT, avoid IPC::Open3 31 31 # because it crashes when launching a non-console app 32 if ( Padre::Constant::WIN32) {32 if (Padre::Constant::WIN32) { 33 33 system( $cmd, @cmd_args ); # we know that Explorer.exe will quit quickly 34 34 } else { … … 59 59 my $main = Padre::Current->main; 60 60 61 unless ( $filename) {61 unless ($filename) { 62 62 $main->error( Wx::gettext("No filename") ); 63 63 return; … … 76 76 77 77 # Unsupported 78 $error = sprintf( Wx::gettext("Unsupported OS: %s"), '$^O');78 $error = sprintf( Wx::gettext("Unsupported OS: %s"), '$^O' ); 79 79 } 80 80 81 if ( $error) {82 $main->error( $error);81 if ($error) { 82 $main->error($error); 83 83 } 84 84 … … 90 90 # 91 91 sub open_with_default_system_editor { 92 my ( $self, $filename) = @_;92 my ( $self, $filename ) = @_; 93 93 94 94 my $main = Padre::Current->main; 95 unless ( $filename) {95 unless ($filename) { 96 96 $main->error( Wx::gettext("No filename") ); 97 97 return; 98 98 } 99 99 100 100 my $error; 101 if(Padre::Constant::WIN32) { 101 if (Padre::Constant::WIN32) { 102 102 103 # Win32 103 104 require Padre::Util::Win32; … … 106 107 file => $filename, 107 108 parameters => '', 108 show => 1); 109 } elsif(Padre::Constant::UNIX) { 109 show => 1 110 ); 111 } elsif (Padre::Constant::UNIX) { 112 110 113 # Unix 111 114 $error = $self->_execute_in_file_mananger($filename); 112 115 } else { 116 113 117 # Unsupported 114 $error = sprintf(Wx::gettext("Unsupported OS: %s"), '$^O'); 115 } 116 117 if ( $error ) { 118 $main->error( $error ); 118 $error = sprintf( Wx::gettext("Unsupported OS: %s"), '$^O' ); 119 119 } 120 120 121 return; 121 if ($error) { 122 $main->error($error); 123 } 124 125 return; 122 126 } 123 127 … … 128 132 die "Only to be called in UNIX!" unless Padre::Constant::UNIX; 129 133 130 my ( $self, $filename) = @_;131 134 my ( $self, $filename ) = @_; 135 132 136 my $error; 133 137 if ( defined $ENV{KDE_FULL_SESSION} ) { -
trunk/Padre/lib/Padre/Wx/Main.pm
r10611 r10612 2390 2390 SCOPE: { 2391 2391 require File::pushd; 2392 2392 2393 # Ticket #845 this project_dir is created in correctly when you do padre somedir/script.pl and run F5 on that 2393 2394 # real stupid think so we don't crash … … 2395 2396 # The other part of this fix is in lib/Padre/Document/Perl.pm in get_command 2396 2397 # Please feel free to fix this 2397 my $pushd = File::pushd::pushd( $document->project_dir ) if -e $document->project_dir;2398 my $pushd = File::pushd::pushd( $document->project_dir ) if -e $document->project_dir; 2398 2399 $self->run_command($cmd); 2399 2400 } … … 2409 2410 SCOPE: { 2410 2411 require File::pushd; 2411 my $pushd = File::pushd::pushd( $document->project_dir ) if -e $document->project_dir;2412 my $pushd = File::pushd::pushd( $document->project_dir ) if -e $document->project_dir; 2412 2413 $self->run_command($cmd); 2413 2414 }
