Changes between Version 49 and Version 50 of PadrePluginCookbookRecipie05


Ignore:
Timestamp:
08/25/12 10:39:10 (20 months ago)
Author:
bowtie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PadrePluginCookbookRecipie05

    v49 v50  
    314314 
    315315=== plugin_icon 
    316 1. from {{{Padre::Plugin}}} 
     3161. from Padra you could use the blue morpho 
    317317{{{#!perl 
    318318sub plugin_icon { 
    319     my $class = shift; 
    320     my $share = $class->plugin_directory_share or return; 
    321     my $file  = File::Spec->catfile( $share, 'icons', '16x16', 'logo.png' ); 
    322     return unless -f $file; 
    323     return unless -r $file; 
    324     return Wx::Bitmap->new( $file, Wx::wxBITMAP_TYPE_PNG ); 
    325 } 
    326 }}} 
    327  
    328 1. To define your your own icon, you can overload the method. 
     319        require Padre::Wx::Icon; 
     320        Padre::Wx::Icon::find('logo'); 
     321} 
     322}}} 
     323 
     3241. To define your your own icon. 
    329325{{{#!perl 
    330326####### 
     
    340336} 
    341337}}} 
    342  
     338{{{#!text 
     339├── lib 
     340│   └── Padre 
     341│       └── Plugin 
     342├── share 
     343│   └── icons 
     344│       └── 16x16 
     345│           └── cookbook.png 
     346└── t 
     347}}} 
    343348 
    344349----