Changeset 9348

Show
Ignore:
Timestamp:
11/30/09 16:20:36 (9 months ago)
Author:
adamk
Message:

Syncing my laptop

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-wxGlade/lib/Padre/Plugin/wxGlade.pm

    r8952 r9348  
    5252                        $self->wx_constants; 
    5353                }, 
     54                'Import Dialog' => sub { 
     55                        $self->create_dialog; 
     56                }, 
    5457        ]; 
    5558} 
     
    6871                croak("Did not provide a PPI document to wx_constants"); 
    6972        } 
     73} 
     74 
     75sub create_dialog { 
     76        my $self = shift; 
     77         
    7078} 
    7179 
     
    113121        $text =~ s/^\tmy \$self = shift;\n//gm; 
    114122        $text =~ s/^\treturn \$self;\n//gm; 
    115         $text =~ s/^\t\$self-\>__set_properties\(\);\n//gm; 
    116         $text =~ s/^\t\$self-\>__do_layout\(\);\n//gm; 
     123        $text =~ s/^\t\$self->__set_properties\(\);\n//gm; 
     124        $text =~ s/^\t\$self->__do_layout\(\);\n//gm; 
     125        $text =~ s/^\t\$self->Layout\(\);//gm; 
    117126        $text =~ s/,\s+\);\n/);\n/gs; 
    118127        $text =~ s/(-\>\w+)\(\)/$1/gs; 
     
    147156} 
    148157 
     158# Any variable that has an underscore and numbers at the end is considered 
     159# something we won't need to address later, so turn them from object HASH 
     160# elements into ordinary lexical variables. 
     161sub lexify_unimportant_variables { 
     162        my $self = shift; 
     163        my $text = shift; 
     164        my %seen = (); 
     165        $text =~ s/\$self->{(\w+_\d+)}/ ($seen{$1}++ ? '' : 'my ') . "\$$1" /ges; 
     166        return $text; 
     167} 
     168 
     169# Reorder statements so they are bunched in an appropriate order 
     170sub reorder_statements { 
     171        my $self  = shift; 
     172        my @lines = @{$_[0]}; 
     173         
     174} 
     175 
    149176# Get the list of real installed constants that are provided by 
    150177# the "use Wx ':everything' call made by Padre::Wx