ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/gde/GCE/AttrEdit.pm
(Generate patch)

Comparing deliantra/gde/GCE/AttrEdit.pm (file contents):
Revision 1.37 by elmex, Sun Aug 27 17:24:20 2006 UTC vs.
Revision 1.38 by elmex, Mon Aug 28 18:24:49 2006 UTC

71 my $w = GCE::AttachEditor->new; 71 my $w = GCE::AttachEditor->new;
72 $w->set_attachment ( 72 $w->set_attachment (
73 $ar->get ('attach'), 73 $ar->get ('attach'),
74 sub { 74 sub {
75 if (@{$_[0]}) { 75 if (@{$_[0]}) {
76 $ar->set (attach => $_[0]) 76 $ar->set_silent (attach => $_[0])
77 } else { 77 } else {
78 $ar->set (attach => undef) 78 $ar->set_silent (attach => undef)
79 } 79 }
80 } 80 }
81 ); 81 );
82 $self->{attach_editor} = $w; 82 $self->{attach_editor} = $w;
83 $w->signal_connect (destroy => sub { delete $self->{attach_editor} }); 83 $w->signal_connect (destroy => sub { delete $self->{attach_editor} });
166 166
167 if ((defined $self->{archref}) && ($self->{archref} != $ar)) { 167 if ((defined $self->{archref}) && ($self->{archref} != $ar)) {
168 $self->{archref}->remove_on_change ('attredit') 168 $self->{archref}->remove_on_change ('attredit')
169 if defined $self->{archref}; 169 if defined $self->{archref};
170 $ar->add_on_change (attredit => sub { $self->set_arch ($_[0]) }); 170 $ar->add_on_change (attredit => sub { $self->set_arch ($_[0]) });
171 $self->{attach_editor}->destroy if $self->{attach_editor};
171 172
172 } elsif (not defined $self->{archref}) { 173 } elsif (not defined $self->{archref}) {
173 $ar->add_on_change (attredit => sub { $self->set_arch ($_[0]) }); 174 $ar->add_on_change (attredit => sub { $self->set_arch ($_[0]) });
174 } 175 }
175 176

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines