Padre-Plugin-Perl6
view release on metacpan or search on metacpan
lib/Padre/Plugin/Perl6.pm view on Meta::CPAN
$self->main->message( sprintf( Wx::gettext("Error loading template file '%s'"), $file ) );
}
return;
}
sub plugin_preferences {
my $self = shift;
require Padre::Plugin::Perl6::Preferences;
my $prefs = Padre::Plugin::Perl6::Preferences->new($self);
$prefs->Show;
}
sub show_about {
my $self = shift;
require Syntax::Highlight::Perl6;
require App::Grok;
my $about = Wx::AboutDialogInfo->new;
$about->SetName("Padre::Plugin::Perl6");
lib/Padre/Plugin/Perl6/Preferences.pm view on Meta::CPAN
# $self->_on_ok_button_clicked;
#
# handler called when the ok button has been clicked.
#
sub _on_ok_button_clicked {
my $self = shift;
my $plugin = $self->_plugin;
# read plugin preferences
my $prefs = $plugin->config;
# update configuration
my $old_p6_highlight = $prefs->{p6_highlight};
my $old_colorizer = $prefs->{colorizer};
$prefs->{p6_highlight} = $self->_colorizer_cb->GetValue();
# store plugin preferences
$plugin->config_write($prefs);
if ( $old_p6_highlight != $prefs->{p6_highlight} || $old_colorizer ne $prefs->{colorizer} ) {
# a configuration change for colorizer
if ( $prefs->{p6_highlight} ) {
$plugin->highlight;
}
}
$self->Destroy;
}
# -- private methods
( run in 1.425 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )