--- deliantra/Deliantra-Client/DC/MapWidget.pm 2006/04/25 13:51:48 1.19 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2006/04/25 14:04:37 1.20 @@ -12,12 +12,16 @@ sub new { my $class = shift; - $class->SUPER::new ( + my $self = $class->SUPER::new ( z => -1, can_focus => 1, list => glGenList, @_ - ) + ); + + $self->add_command ("killpets", "kills all your summoned and charmed creates"); + + $self } sub DESTROY { @@ -239,7 +243,10 @@ (my $abbrev = $command) =~ s/(\S)[^[:space:]_]*[[:space:]_]+/$1/g; - push @{$self->{command}}, [$abbrev, $command, $tooltip, $widget, $cb]; + $self->{command} = [ + [$abbrev, $command, $tooltip, $widget, $cb], + grep $_->[1] ne $command, @{ $self->{command} }, + ]; } package CFClient::MapWidget::MapMap; @@ -365,7 +372,7 @@ for (@$command) { if ($_->[0] =~ $search_abbrev) { push @found, [$_->[0], $_]; - } elsif ($_->[1] =~ $search_full) { + } elsif (2 < length $self->{search} and $_->[1] =~ $search_full) { push @found, [$_->[1], $_]; } }