--- deliantra/Deliantra-Client/DC/Item.pm 2007/04/23 19:17:41 1.4
+++ deliantra/Deliantra-Client/DC/Item.pm 2007/08/14 12:02:14 1.7
@@ -2,6 +2,7 @@
use strict;
use utf8;
+use Encode;
use Crossfire::Protocol::Constants;
@@ -116,7 +117,7 @@
&::open_string_query ("Text to inscribe", sub {
my ($entry, $txt) = @_;
$::CONN->send ("mark ". pack "N", $self->{tag});
- $::CONN->send ("command use_skill inscription $txt");
+ $::CONN->send_utf8 ("command use_skill inscription $txt");
});
}
],
@@ -125,7 +126,7 @@
&::open_string_query ("Rename item to:", sub {
my ($entry, $txt) = @_;
$::CONN->send ("mark ". pack "N", $self->{tag});
- $::CONN->send ("command rename to <$txt>");
+ $::CONN->send_utf8 ("command rename to <$txt>");
}, $self->{name},
"If you input no name or erase the current custom name, the custom name will be unset");
}
@@ -196,7 +197,7 @@
on_tooltip_show => sub {
my ($widget) = @_;
- $::CONN->ex ($self->{tag}, sub {
+ $::CONN && $::CONN->ex ($self->{tag}, sub {
my ($long_desc) = @_;
$long_desc =~ s/\s+$//;
@@ -211,8 +212,8 @@
$self->{desc_widget}{bg} = $bg;
$self->{desc_widget}->set_text ($desc);
- my $long_desc = $self->{long_desc} || "$desc.";
- $self->{desc_widget}->set_tooltip ("$long_desc\n$tooltip_std");
+ my $long_desc = $self->{long_desc} || $desc;
+ $self->{desc_widget}->set_tooltip ("$long_desc\n\n$tooltip_std");
$self->{weight_widget} ||= new CFPlus::UI::Label
can_events => 1,
@@ -230,3 +231,4 @@
. "\n\n$tooltip_std"
);
}
+