ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.38 by root, Sun Jun 18 17:13:11 2006 UTC vs.
Revision 1.39 by root, Mon Jun 19 06:50:45 2006 UTC

769 }, 769 },
770 ); 770 );
771 771
772 $vbox->add ($self->{options} = new CFClient::UI::VBox); 772 $vbox->add ($self->{options} = new CFClient::UI::VBox);
773 773
774 $self->{close_button} = new CFClient::UI::Button 774 $self->{bye_button} = new CFClient::UI::Button
775 text => "Bye (close)", 775 text => "Bye (close)",
776 tooltip => "Use this button to end talking to the NPC. This also closes the dialog window.", 776 tooltip => "Use this button to end talking to the NPC. This also closes the dialog window.",
777 on_activate => sub { $this->destroy; 0 }, 777 on_activate => sub { $this->destroy; 0 },
778 ; 778 ;
779 779
795 my ($self) = @_; 795 my ($self) = @_;
796 796
797 Scalar::Util::weaken $self; 797 Scalar::Util::weaken $self;
798 798
799 $self->{options}->clear; 799 $self->{options}->clear;
800 $self->{options}->add ($self->{close_button}); 800 $self->{options}->add ($self->{bye_button});
801 801
802 for my $kw (sort keys %{ $self->{kw} }) { 802 for my $kw (sort keys %{ $self->{kw} }) {
803 $self->{options}->add (new CFClient::UI::Button 803 $self->{options}->add (new CFClient::UI::Button
804 text => $kw, 804 text => $kw,
805 on_activate => sub { 805 on_activate => sub {
840} 840}
841 841
842sub destroy { 842sub destroy {
843 my ($self) = @_; 843 my ($self) = @_;
844 844
845 #Carp::cluck "debug\n";#d# #todo# enable: destroyx gets called twice because scalar keys {} is 1 845 #Carp::cluck "debug\n";#d# #todo# enable: destroy gets called twice because scalar keys {} is 1
846 846
847 delete $self->{conn}{npc_dialog}; 847 delete $self->{conn}{npc_dialog};
848 $self->{conn}->disconnect_ext ($self->{token}); 848 $self->{conn}->disconnect_ext ($self->{token});
849 849
850 $self->SUPER::destroy; 850 $self->SUPER::destroy;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines