[Padre-dev] [Padre-commit] rev 2438 - in trunk: Padre-Plugin-AcmePlayCode/lib/Padre/Plugin Padre-Plugin-CSS/lib/Padre/Plugin Padre-Plugin-Encrypt/lib/Padre/Plugin Padre-Plugin-HTML/lib/Padre/Plugin Padre-Plugin-HTMLExport/lib/Padre/Plugin Padre-Plugin-JavaScript/lib/Padre/Plugin Padre-Plugin-LineFilter/lib/Padre/Plugin Padre-Plugin-PAR/lib/Padre/Plugin Padre-Plugin-PerlTidy/lib/Padre/Plugin Padre-Plugin-Vi/lib/Padre/Plugin/Vi Padre-Plugin-ViewInBrowser/lib/Padre/Plugin Padre-Plugin-XML/lib/Padre/Plugin

Fayland Lam fayland at gmail.com
Sun Jan 4 17:52:47 PST 2009


   trunk/Padre-Plugin-LineFilter/lib/Padre/Plugin/LineFilter.pm
   trunk/Padre-Plugin-PAR/lib/Padre/Plugin/PAR.pm
   trunk/Padre-Plugin-PerlTidy/lib/Padre/Plugin/PerlTidy.pm
   trunk/Padre-Plugin-Vi/lib/Padre/Plugin/Vi/CommandLine.pm


those 4 dists should be upgraded for the new Padre 0.23

BTW, I did others and uploaded to CPAN.

Thanks.

svn at perlide.org wrote:
> Author: fayland
> See also: http://padre.perlide.org/changeset/2438
> Date: 2009-01-04 00:25:14 -0800 (Sun, 04 Jan 2009)
> New Revision: 2438
>
> Modified:
>    trunk/Padre-Plugin-AcmePlayCode/lib/Padre/Plugin/AcmePlayCode.pm
>    trunk/Padre-Plugin-CSS/lib/Padre/Plugin/CSS.pm
>    trunk/Padre-Plugin-Encrypt/lib/Padre/Plugin/Encrypt.pm
>    trunk/Padre-Plugin-HTML/lib/Padre/Plugin/HTML.pm
>    trunk/Padre-Plugin-HTMLExport/lib/Padre/Plugin/HTMLExport.pm
>    trunk/Padre-Plugin-JavaScript/lib/Padre/Plugin/JavaScript.pm
>    trunk/Padre-Plugin-LineFilter/lib/Padre/Plugin/LineFilter.pm
>    trunk/Padre-Plugin-PAR/lib/Padre/Plugin/PAR.pm
>    trunk/Padre-Plugin-PerlTidy/lib/Padre/Plugin/PerlTidy.pm
>    trunk/Padre-Plugin-Vi/lib/Padre/Plugin/Vi/CommandLine.pm
>    trunk/Padre-Plugin-ViewInBrowser/lib/Padre/Plugin/ViewInBrowser.pm
>    trunk/Padre-Plugin-XML/lib/Padre/Plugin/XML.pm
> Log:
> Alias>	From: ->selected_
> Alias>	To: ->current->
>
> Modified: trunk/Padre-Plugin-AcmePlayCode/lib/Padre/Plugin/AcmePlayCode.pm
> ===================================================================
> --- trunk/Padre-Plugin-AcmePlayCode/lib/Padre/Plugin/AcmePlayCode.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-AcmePlayCode/lib/Padre/Plugin/AcmePlayCode.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -30,8 +30,8 @@
>  	
>  	my $code;
>  	
> -	my $src = $self->selected_text;
> -	my $doc = $self->selected_document;
> +	my $src = $self->current->text;
> +	my $doc = $self->current->document;
>      if ( $src ) {
>  		$code = $src;
>      } else {
> @@ -43,7 +43,7 @@
>  	my $played = $playapp->play($code);
>  	
>  	if ( $src ) {
> -		my $editor = $self->selected_editor;
> +		my $editor = $self->current->editor;
>  	    $editor->ReplaceSelection( $played );
>  	} else {
>  		$doc->text_set( $played );
>
> Modified: trunk/Padre-Plugin-CSS/lib/Padre/Plugin/CSS.pm
> ===================================================================
> --- trunk/Padre-Plugin-CSS/lib/Padre/Plugin/CSS.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-CSS/lib/Padre/Plugin/CSS.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -27,7 +27,7 @@
>  sub validate_css {
>  	my ( $self ) = @_;
>  	
> -	my $doc  = $self->selected_document;
> +	my $doc  = $self->current->document;
>  	my $code = $doc->text_get;
>  	
>  	unless ( $code and length($code) ) {
> @@ -69,8 +69,8 @@
>  sub css_minifier {
>  	my ( $win) = @_;
>  
> -	my $src = $win->selected_text;
> -	my $doc = $win->selected_document;
> +	my $src = $win->current->text;
> +	my $doc = $win->current->document;
>  	my $code = $src ? $src : $doc->text_get;
>  	return unless ( defined $code and length($code) );
>  
> @@ -80,7 +80,7 @@
>  	my $css = minify( $code );
>      
>      if ( $src ) {
> -		my $editor = $win->selected_editor;
> +		my $editor = $win->current->editor;
>  	    $editor->ReplaceSelection( $css );
>  	} else {
>  		$doc->text_set( $css );
>
> Modified: trunk/Padre-Plugin-Encrypt/lib/Padre/Plugin/Encrypt.pm
> ===================================================================
> --- trunk/Padre-Plugin-Encrypt/lib/Padre/Plugin/Encrypt.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-Encrypt/lib/Padre/Plugin/Encrypt.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -94,7 +94,7 @@
>  	my $type = $data->{_type_};
>  
>  	my $main_window = Padre->ide->wx->main_window;
> -	my $doc = $main_window->selected_document;
> +	my $doc = $main_window->current->document;
>  	my $code = $doc->text_get;
>  	
>  	require Crypt::CBC;
>
> Modified: trunk/Padre-Plugin-HTML/lib/Padre/Plugin/HTML.pm
> ===================================================================
> --- trunk/Padre-Plugin-HTML/lib/Padre/Plugin/HTML.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-HTML/lib/Padre/Plugin/HTML.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -28,7 +28,7 @@
>  sub validate_html {
>  	my ( $self ) = @_;
>  	
> -	my $doc  = $self->selected_document;
> +	my $doc  = $self->current->document;
>  	my $code = $doc->text_get;
>  	
>  	unless ( $code and length($code) ) {
> @@ -67,8 +67,8 @@
>  sub tidy_html {
>  	my ( $self ) = @_;
>  	
> -	my $src = $self->selected_text;
> -	my $doc = $self->selected_document;
> +	my $src = $self->current->text;
> +	my $doc = $self->current->document;
>  	my $code = ( $src ) ? $src : $doc->text_get;
>  	
>  	return unless ( defined $code and length($code) );
> @@ -87,7 +87,7 @@
>  	_output($self, $text);
>  	
>  	if ( $src ) {
> -		my $editor = $self->selected_editor;
> +		my $editor = $self->current->editor;
>  	    $editor->ReplaceSelection( $cleaned_code );
>  	} else {
>  		$doc->text_set( $cleaned_code );
> @@ -97,8 +97,8 @@
>  sub html_lint {
>  	my ( $self ) = @_;
>  	
> -	my $src = $self->selected_text;
> -	my $doc = $self->selected_document;
> +	my $src = $self->current->text;
> +	my $doc = $self->current->document;
>  	my $code = ( $src ) ? $src : $doc->text_get;
>  	
>  	return unless ( defined $code and length($code) );
>
> Modified: trunk/Padre-Plugin-HTMLExport/lib/Padre/Plugin/HTMLExport.pm
> ===================================================================
> --- trunk/Padre-Plugin-HTMLExport/lib/Padre/Plugin/HTMLExport.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-HTMLExport/lib/Padre/Plugin/HTMLExport.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -52,7 +52,7 @@
>  sub export_html {
>  	my ( $self ) = @_;
>  
> -	my $doc     = $self->selected_document or return;
> +	my $doc     = $self->current->document or return;
>  	my $current = $doc->filename;
>  	my $default_dir;
>  	if ( defined $current ) {
>
> Modified: trunk/Padre-Plugin-JavaScript/lib/Padre/Plugin/JavaScript.pm
> ===================================================================
> --- trunk/Padre-Plugin-JavaScript/lib/Padre/Plugin/JavaScript.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-JavaScript/lib/Padre/Plugin/JavaScript.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -35,8 +35,8 @@
>  sub js_eautifier {
>  	my ( $win) = @_;
>  
> -	my $src = $win->selected_text;
> -	my $doc = $win->selected_document;
> +	my $src = $win->current->text;
> +	my $doc = $win->current->document;
>  	my $code = $src ? $src : $doc->text_get;
>  	return unless ( defined $code and length($code) );
>  
> @@ -49,7 +49,7 @@
>      } );
>      
>      if ( $src ) {
> -		my $editor = $win->selected_editor;
> +		my $editor = $win->current->editor;
>  	    $editor->ReplaceSelection( $pretty_js );
>  	} else {
>  		$doc->text_set( $pretty_js );
> @@ -59,8 +59,8 @@
>  sub js_minifier {
>  	my ( $win) = @_;
>  
> -	my $src = $win->selected_text;
> -	my $doc = $win->selected_document;
> +	my $src = $win->current->text;
> +	my $doc = $win->current->document;
>  	my $code = $src ? $src : $doc->text_get;
>  	return unless ( defined $code and length($code) );
>  
> @@ -70,7 +70,7 @@
>  	my $mjs = minify( $code );
>      
>      if ( $src ) {
> -		my $editor = $win->selected_editor;
> +		my $editor = $win->current->editor;
>  	    $editor->ReplaceSelection( $mjs );
>  	} else {
>  		$doc->text_set( $mjs );
>
> Modified: trunk/Padre-Plugin-LineFilter/lib/Padre/Plugin/LineFilter.pm
> ===================================================================
> --- trunk/Padre-Plugin-LineFilter/lib/Padre/Plugin/LineFilter.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-LineFilter/lib/Padre/Plugin/LineFilter.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -57,7 +57,7 @@
>      my $filter = user_input($window, Wx::gettext("Filter: Document Remain"));
>      return unless $filter;
>  
> -    my $doc = $window->selected_document;
> +    my $doc = $window->current->document;
>      my $src = $doc->text_get;
>      return unless $src;
>  
> @@ -71,7 +71,7 @@
>      my $filter = user_input($window, Wx::gettext("Filter: Document Delete"));
>      return unless $filter;
>  
> -    my $doc = $window->selected_document;
> +    my $doc = $window->current->document;
>      my $src = $doc->text_get;
>      return unless $src;
>  
> @@ -85,12 +85,12 @@
>      my $filter = user_input($window, Wx::gettext("Filter: Selection Remain"));
>      return unless $filter;
>  
> -    my $src = $window->selected_text;
> +    my $src = $window->current->text;
>      return unless $src;
>  
>      my $newtext = filtering($filter, $src);
>  
> -    my $editor = $window->selected_editor;
> +    my $editor = $window->current->editor;
>      $editor->ReplaceSelection( $newtext );
>      select_all($window);
>  }
> @@ -101,12 +101,12 @@
>      my $filter = user_input($window, Wx::gettext("Filter: Selection Delete"));
>      return unless $filter;
>  
> -    my $src = $window->selected_text;
> +    my $src = $window->current->text;
>      return unless $src;
>  
>      my $newtext = filtering($filter, $src, 1);
>  
> -    my $editor = $window->selected_editor;
> +    my $editor = $window->current->editor;
>      $editor->ReplaceSelection( $newtext );
>      select_all($window);
>  }
>
> Modified: trunk/Padre-Plugin-PAR/lib/Padre/Plugin/PAR.pm
> ===================================================================
> --- trunk/Padre-Plugin-PAR/lib/Padre/Plugin/PAR.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-PAR/lib/Padre/Plugin/PAR.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -65,7 +65,7 @@
>      #print "Stand alone called\n";
>      # get name of the current file, if it is a pl file create the corresponding .exe
>  
> -    my $doc = $mw->selected_document;
> +    my $doc = $mw->current->document;
>  
>      my $filename = $doc->filename;
>      my $tmpfh;
>
> Modified: trunk/Padre-Plugin-PerlTidy/lib/Padre/Plugin/PerlTidy.pm
> ===================================================================
> --- trunk/Padre-Plugin-PerlTidy/lib/Padre/Plugin/PerlTidy.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-PerlTidy/lib/Padre/Plugin/PerlTidy.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -43,7 +43,7 @@
>  
>      return unless defined $src;
>  
> -    my $doc = $self->selected_document;
> +    my $doc = $self->current->document;
>  
>      if ( !$doc->isa( 'Padre::Document::Perl' ) ) {
>          return Wx::MessageBox( 'Document is not a Perl document',
> @@ -84,7 +84,7 @@
>  
>  sub tidy_selection {
>      my ( $self, $event ) = @_;
> -    my $src = $self->selected_text;
> +    my $src = $self->current->text;
>  
>      my $newtext = _tidy( $self, $src );
>  
> @@ -92,14 +92,14 @@
>  
>      $newtext =~ s{\n$}{};
>  
> -    my $editor = $self->selected_editor;
> +    my $editor = $self->current->editor;
>      $editor->ReplaceSelection( $newtext );
>  }
>  
>  sub tidy_document {
>      my ( $self, $event ) = @_;
>  
> -    my $doc = $self->selected_document;
> +    my $doc = $self->current->document;
>      my $src = $doc->text_get;
>  
>      my $newtext = _tidy( $self, $src );
> @@ -112,7 +112,7 @@
>  sub _get_filename {
>      my $self = shift;
>  
> -    my $doc     = $self->selected_document or return;
> +    my $doc     = $self->current->document or return;
>      my $current = $doc->filename;
>      my $default_dir = '';
>  
> @@ -161,7 +161,7 @@
>  
>      return unless defined $src;
>  
> -    my $doc = $self->selected_document;
> +    my $doc = $self->current->document;
>  
>      if ( !$doc->isa( 'Padre::Document::Perl' ) ) {
>          return Wx::MessageBox( 'Document is not a Perl document',
> @@ -207,7 +207,7 @@
>  
>  sub export_selection {
>      my ( $self, $event ) = @_;
> -    my $src = $self->selected_text;
> +    my $src = $self->current->text;
>  
>      _export( $self, $src );
>      return;
> @@ -216,7 +216,7 @@
>  sub export_document {
>      my ( $self, $event ) = @_;
>  
> -    my $doc = $self->selected_document;
> +    my $doc = $self->current->document;
>      my $src = $doc->text_get;
>  
>      _export( $self, $src );
>
> Modified: trunk/Padre-Plugin-Vi/lib/Padre/Plugin/Vi/CommandLine.pm
> ===================================================================
> --- trunk/Padre-Plugin-Vi/lib/Padre/Plugin/Vi/CommandLine.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-Vi/lib/Padre/Plugin/Vi/CommandLine.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -113,9 +113,9 @@
>  		$main->on_save;
>  		$main->Close;
>  	} elsif ($cmd =~ /^\d+$/) {
> -		Padre->ide->wx->main_window->selected_editor->GotoLine($cmd-1);
> +		Padre->ide->wx->main_window->current->editor->GotoLine($cmd-1);
>  	} elsif ($cmd =~ m{%s/}) {
> -		my $editor = Padre->ide->wx->main_window->selected_editor;
> +		my $editor = Padre->ide->wx->main_window->current->editor;
>  		my $text = $editor->GetText;
>  		$cmd = substr($cmd, 1);
>  		eval "\$text =~ $cmd";
>
> Modified: trunk/Padre-Plugin-ViewInBrowser/lib/Padre/Plugin/ViewInBrowser.pm
> ===================================================================
> --- trunk/Padre-Plugin-ViewInBrowser/lib/Padre/Plugin/ViewInBrowser.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-ViewInBrowser/lib/Padre/Plugin/ViewInBrowser.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -21,7 +21,7 @@
>  sub view_in_browser {
>  	my ( $self ) = @_;
>  	
> -	my $filename = $self->selected_filename;
> +	my $filename = $self->current->filename;
>  	unless ( $filename ) {
>  		Wx::MessageBox( 'What to open? God KNOWS!',
>  		'Error', Wx::wxOK | Wx::wxCENTRE, $self );
> @@ -44,7 +44,7 @@
>  
>  =head1 DESCRIPTION
>  
> -basically it's a shortcut for Wx::LaunchDefaultBrowser( $self->selected_filename );
> +basically it's a shortcut for Wx::LaunchDefaultBrowser( $self->current->filename );
>  
>  =head1 AUTHOR
>  
>
> Modified: trunk/Padre-Plugin-XML/lib/Padre/Plugin/XML.pm
> ===================================================================
> --- trunk/Padre-Plugin-XML/lib/Padre/Plugin/XML.pm	2009-01-04 07:57:22 UTC (rev 2437)
> +++ trunk/Padre-Plugin-XML/lib/Padre/Plugin/XML.pm	2009-01-04 08:25:14 UTC (rev 2438)
> @@ -26,8 +26,8 @@
>  sub tidy_xml {
>  	my ( $self ) = @_;
>  	
> -	my $src = $self->selected_text;
> -	my $doc = $self->selected_document;
> +	my $src = $self->current->text;
> +	my $doc = $self->current->document;
>  	my $code = ( $src ) ? $src : $doc->text_get;
>  	
>  	return unless ( defined $code and length($code) );
> @@ -38,7 +38,7 @@
>  	
>  	my $string = $tidy_obj->toString();
>  	if ( $src ) {
> -		my $editor = $self->selected_editor;
> +		my $editor = $self->current->editor;
>  		$editor->ReplaceSelection( $string );
>  	} else {
>  		$doc->text_set( $string );
>
> _______________________________________________
> Padre-commit mailing list
> Padre-commit at perlide.org
> http://mail.perlide.org/mailman/listinfo/padre-commit
>
>   


-- 
Fayland Lam // http://www.fayland.org/ 
Foorum based on Catalyst // http://www.foorumbbs.com/ 



More information about the Padre-dev mailing list