Padre

 view release on metacpan or  search on metacpan

lib/Padre/Wx/Dialog/Advanced.pm  view on Meta::CPAN

	$self->_update_ui($pref);

	return;
}

# Private method to handle the pressing of the save button
sub _on_save_button {
	my $self    = shift;
	my $config  = $self->config;
	my $current = $self->current;
	my $prefs   = $self->{preferences};

	# Lock most of Padre so any apply handlers run quickly
	my $lock = $self->main->lock( 'UPDATE', 'REFRESH', 'DB' );

	# Find the values that have changed
	for my $name ( sort keys %$prefs ) {
		my $pref     = $prefs->{$name};
		my $type     = $pref->{type};
		my $value    = $pref->{value};
		my $original = $pref->{original};
		if ( $type == Padre::Constant::ASCII or $type == Padre::Constant::PATH ) {
			next if $value eq $original;
		} else {
			next if $value == $original;
		}

		$config->apply( $name, $value, $current );

lib/Padre/Wx/Icon.pm  view on Meta::CPAN

	my $icon  = Wx::Icon->new;
	$icon->CopyFromBitmap($image);
	return $icon;
}

# For now, assume the people using this are competent
# and don't bother to check params.
# TO DO: Clearly this assumption can't last...
sub find {
	my $name  = shift;
	my $prefs = shift;

	# If you _really_ are competant ;),
	# prefer size, icons, ext
	# over the defaults
	my %pref =
		Params::Util::_HASH($prefs)
		? ( %PREFS, %$prefs )
		: %PREFS;

	# Search through the theme list
	foreach my $theme (THEMES) {
		my $hinted =
			( $HINT{$theme} and $HINT{$theme}->{$name} )
			? $HINT{$theme}->{$name}
			: $name;
		my $file = File::Spec->catfile(
			$pref{icons},



( run in 0.886 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )