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