Changes between Version 56 and Version 57 of PadrePluginCookbookRecipie05


Ignore:
Timestamp:
11/25/12 19:19:05 (17 months ago)
Author:
bowtie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PadrePluginCookbookRecipie05

    v56 v57  
    348348 
    349349---- 
    350 === about_dialog 
    351  
    352 The following are from wxperl_demo.pl both work in a Plugin, chose and edit to taste. 
     350=== plugin_about 
     351 
     352The example is from Padre-Plugin-Git 
     353{{{#!perl 
     354####### 
     355# plugin_about 
     356####### 
     357sub plugin_about { 
     358        my $self = shift; 
     359 
     360        my $share = $self->plugin_directory_share or return; 
     361        my $file = File::Spec->catfile( $share, 'icons', '32x32', 'git.png' ); 
     362        return unless -f $file; 
     363        return unless -r $file; 
     364 
     365        my $info = Wx::AboutDialogInfo->new; 
     366 
     367        $info->SetIcon( Wx::Icon->new( $file, Wx::wxBITMAP_TYPE_PNG ) ); 
     368        $info->SetName('Padre::Plugin::Git'); 
     369        $info->SetVersion($VERSION); 
     370        $info->SetDescription( Wx::gettext('A Simple Git interface for Padre') ); 
     371        $info->SetCopyright('(c) 2008-2012 The Padre development team'); 
     372        $info->SetWebSite('http://padre.perlide.org/trac/wiki/PadrePluginGit'); 
     373        $info->AddDeveloper('Kaare Rasmussen, <kaare@cpan.org>'); 
     374        $info->AddDeveloper('Kevin Dawson <bowtie@cpan.org>'); 
     375 
     376        Wx::AboutBox($info); 
     377        return; 
     378} 
     379}}} 
     380 
     381Also see the following from wxperl_demo.pl both work in a Plugin, chose and edit to taste. 
    353382 
    354383{{{#!perl