| 1 | package Padre::Plugin::Cookbook::Recipe03::About; | ||
| 2 | |||
| 3 | 2 | ▶ | use v5.10.1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | |||
| 8 | # Version required | ||
| 9 | our $VERSION = '0.24'; | ||
| 10 | 2 | ▶ | use parent qw( Padre::Plugin::Cookbook::Recipe03::FBP::AboutFB ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | use Data::Dumper (); | ||
| 13 | |||
| 14 | sub new { | ||
| 15 | my $class = shift; | ||
| 16 | my $main = shift; | ||
| 17 | |||
| 18 | # Create the dialog | ||
| 19 | my $self = $class->SUPER::new($main); | ||
| 20 | |||
| 21 | # add package name to about dialog | ||
| 22 | my @package = split /::/x, __PACKAGE__,; | ||
| 23 | $self->name_version->SetLabel( $package[-2] . ' ' . $VERSION ); | ||
| 24 | |||
| 25 | # add your name below | ||
| 26 | $self->developed_by->SetLabel("developed by bowtie"); | ||
| 27 | |||
| 28 | $self->CenterOnParent; | ||
| 29 | return $self; | ||
| 30 | } | ||
| 31 | |||
| 32 | sub credits_clicked { | ||
| 33 | my $self = shift; | ||
| 34 | my $main = $self->main; | ||
| 35 | |||
| 36 | $main->show_output(1); | ||
| 37 | my $output = $main->output; | ||
| 38 | $output->clear; | ||
| 39 | |||
| 40 | my $space = q{ }; | ||
| 41 | my %credits = ( | ||
| 42 | 'bowtie' => $space, | ||
| 43 | 'Alias' => $space, | ||
| 44 | 'El_Che' => $space, | ||
| 45 | 'claudio' => $space, | ||
| 46 | 'azawawi' => $space, | ||
| 47 | 'abc' => 'abc@abc.com', | ||
| 48 | ); | ||
| 49 | |||
| 50 | $output->AppendText("CREDITS\ncredits_clicked \n\tname:\t\t<e-mail>\n"); | ||
| 51 | while ( my ( $key, $value ) = each %credits ) { | ||
| 52 | $output->AppendText("\t$key:\t\t$value\n"); | ||
| 53 | } | ||
| 54 | return; | ||
| 55 | } | ||
| 56 | |||
| 57 | sub licence_clicked { | ||
| 58 | my $self = shift; | ||
| 59 | my $main = $self->main; | ||
| 60 | |||
| 61 | $main->show_output(1); | ||
| 62 | my $output = $main->output; | ||
| 63 | $output->clear; | ||
| 64 | |||
| 65 | my $licence = <<'END_LICENCE'; | ||
| 66 | LICENSE & COPYRIGHT | ||
| 67 | |||
| 68 | Copyright 2008-2011 The Padre development team as listed in Padre.pm. | ||
| 69 | |||
| 70 | This is free software; you can redistribute it and/or modify it under | ||
| 71 | the same terms as the Perl 5 programming language system itself. | ||
| 72 | |||
| 73 | Terms of the Perl programming language system itself | ||
| 74 | |||
| 75 | a) the GNU General Public License as published by the Free | ||
| 76 | Software Foundation; either version 1, or (at your option) any later | ||
| 77 | version, or | ||
| 78 | b) the "Artistic License" | ||
| 79 | |||
| 80 | The full text of the license can be found in the LICENSE file included with | ||
| 81 | this module. | ||
| 82 | |||
| 83 | END_LICENCE | ||
| 84 | |||
| 85 | $output->AppendText($licence); | ||
| 86 | |||
| 87 | # while ( my $licence = <DATA> ) { | ||
| 88 | # $output->AppendText($licence); | ||
| 89 | # } | ||
| 90 | return; | ||
| 91 | } | ||
| 92 | |||
| 93 | 1; | ||
| 94 | |||
| 95 | __END__ | ||