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.15 by root, Sun Jan 11 23:50:27 2009 UTC vs.
Revision 1.19 by root, Wed Nov 21 13:23:10 2012 UTC

1package DC::Item; 1package DC::Item;
2 2
3use strict; 3use common::sense;
4use utf8;
5use Encode;
6 4
7use Deliantra::Protocol::Constants; 5use Deliantra::Protocol::Constants;
8 6
9my $last_enter_count = 1; 7my $last_enter_count = 1;
10 8
12 my ($self) = @_; 10 my ($self) = @_;
13 11
14 my $desc = 12 my $desc =
15 $self->{nrof} < 2 13 $self->{nrof} < 2
16 ? $self->{name} 14 ? $self->{name}
17 : "$self->{nrof} × $self->{name_pl}"; 15 : "$self->{nrof} $self->{name_pl}";
18 16
19 $self->{flags} & F_OPEN 17 $self->{flags} & F_OPEN
20 and $desc .= " (open)"; 18 and $desc .= " (open)";
21 $self->{flags} & F_APPLIED 19 $self->{flags} & F_APPLIED
22 and $desc .= " (applied)"; 20 and $desc .= " (applied)";
219 my ($widget) = @_; 217 my ($widget) = @_;
220 218
221 $::CONN && $::CONN->ex ($self->{tag}, sub { 219 $::CONN && $::CONN->ex ($self->{tag}, sub {
222 my ($long_desc) = @_; 220 my ($long_desc) = @_;
223 221
224 $long_desc = DC::Protocol::sanitise_xml ($long_desc); 222 $long_desc = DC::sanitise_cfxml ($long_desc);
225 223
226 $self->{long_desc} = $long_desc; 224 $self->{long_desc} = $long_desc;
227 $widget->set_tooltip ("<b>$long_desc</b>\n\n$tooltip_std"); 225 $widget->set_tooltip ("<b>$long_desc</b>\n\n$tooltip_std");
228 }); 226 });
229 }, 227 },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines