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

Comparing deliantra/Deliantra-Client/DC/Item.pm (file contents):
Revision 1.4 by root, Mon Apr 23 19:17:41 2007 UTC vs.
Revision 1.6 by root, Tue Jul 17 22:08:56 2007 UTC

194 194
195 on_button_down => $button_cb, 195 on_button_down => $button_cb,
196 on_tooltip_show => sub { 196 on_tooltip_show => sub {
197 my ($widget) = @_; 197 my ($widget) = @_;
198 198
199 $::CONN->ex ($self->{tag}, sub { 199 $::CONN && $::CONN->ex ($self->{tag}, sub {
200 my ($long_desc) = @_; 200 my ($long_desc) = @_;
201 201
202 $long_desc =~ s/\s+$//; 202 $long_desc =~ s/\s+$//;
203 203
204 $self->{long_desc} = $long_desc; 204 $self->{long_desc} = $long_desc;
209 209
210 my $desc = CFPlus::Item::desc_string $self; 210 my $desc = CFPlus::Item::desc_string $self;
211 $self->{desc_widget}{bg} = $bg; 211 $self->{desc_widget}{bg} = $bg;
212 $self->{desc_widget}->set_text ($desc); 212 $self->{desc_widget}->set_text ($desc);
213 213
214 my $long_desc = $self->{long_desc} || "<b>$desc</b>."; 214 my $long_desc = $self->{long_desc} || $desc;
215 $self->{desc_widget}->set_tooltip ("$long_desc\n$tooltip_std"); 215 $self->{desc_widget}->set_tooltip ("<b>$long_desc</b>\n\n$tooltip_std");
216 216
217 $self->{weight_widget} ||= new CFPlus::UI::Label 217 $self->{weight_widget} ||= new CFPlus::UI::Label
218 can_events => 1, 218 can_events => 1,
219 can_hover => 1, 219 can_hover => 1,
220 ellipsise => 0, 220 ellipsise => 0,
228 . ($self->{weight} >= 0 ? "One item weighs $self->{weight}g. " : "You have no idea how much this weighs. ") 228 . ($self->{weight} >= 0 ? "One item weighs $self->{weight}g. " : "You have no idea how much this weighs. ")
229 . ($self->{nrof} ? "You have $self->{nrof} of it. " : "Item cannot stack with others of it's kind. ") 229 . ($self->{nrof} ? "You have $self->{nrof} of it. " : "Item cannot stack with others of it's kind. ")
230 . "\n\n$tooltip_std" 230 . "\n\n$tooltip_std"
231 ); 231 );
232} 232}
233

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines