--- deliantra/Deliantra-Client/DC/UI.pm 2006/11/16 19:42:45 1.353 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/11/18 23:31:23 1.354 @@ -516,8 +516,8 @@ sub emit { my ($self, $signal, @args) = @_; - # I do not really like this solution, but I dislike duplication - # and needlessly verbose code, too. + # I do not really like this solution, but I do not like duplication + # and needlessly verbose code, either. my @append = $has_coords{$signal} ? $args[0]->xy ($self) @@ -525,10 +525,23 @@ #warn +(caller(1))[3] . "emit $signal on $self (parent $self->{parent})\n";#d# + if ($self->{tooltip} =~ /Apply.*audio/) { + warn "2 ", join ":", @{ $self->{signal_cb}{$signal} || []}, "\n";#d# + warn "3 $self->{parent}\n";#d# + } + #d##TODO# stop propagating at first true, do not use sum + my $res = (List::Util::sum map $_->($self, @args, @append), @{$self->{signal_cb}{$signal} || []}) # before || ($self->can ("invoke_$signal") || sub { 1 })->($self, @args, @append) # closure || ($self->{parent} && $self->{parent}->emit ($signal, @args)) # parent + ; + if ($self->{tooltip} =~ /Apply.*audio/) { + warn "4 ", join ":", @{ $self->{signal_cb}{$signal} || []}, "\n";#d# + warn "5 $self->{parent}\n";#d# + } + + $res } sub find_widget {