| 1 | package Padre::Plugin::Template; | ||
| 2 | use base 'Padre::Plugin'; | ||
| 3 | |||
| 4 | use 5.008; | ||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | use Padre::Plugin (); | ||
| 8 | use Padre::Wx (); | ||
| 9 | use Padre::Plugin::Shell::Template; | ||
| 10 | |||
| 11 | our $VERSION = '0.1'; | ||
| 12 | |||
| 13 | my $template_plugin; | ||
| 14 | |||
| 15 | ##################################################################### | ||
| 16 | # Padre::Plugin Methods | ||
| 17 | |||
| 18 | sub plugin_name { | ||
| 19 | 'Template'; | ||
| 20 | } | ||
| 21 | |||
| 22 | sub padre_interfaces { | ||
| 23 | 'Padre::Plugin' => 0.43; | ||
| 24 | } | ||
| 25 | |||
| 26 | sub menu_plugins_simple { | ||
| 27 | my ($self) = @_; | ||
| 28 | |||
| 29 | $template_plugin = Padre::Plugin::Shell::Template->new(); | ||
| 30 | my @template_menu = $template_plugin->plugin_menu(); | ||
| 31 | unless (@template_menu) { | ||
| 32 | my $msg = Wx::gettext("Error loading template menu"); | ||
| 33 | @template_menu = ( $msg => undef ); | ||
| 34 | } | ||
| 35 | '&Template' => [@template_menu]; | ||
| 36 | } | ||
| 37 | |||
| 38 | 1; | ||
| 39 | |||
| 40 | __END__ |