--- deliantra/Deliantra-Client/DC.pm 2006/06/05 22:07:42 1.90 +++ deliantra/Deliantra-Client/DC.pm 2006/06/28 09:45:10 1.94 @@ -27,6 +27,7 @@ use AnyEvent (); use BerkeleyDB; use Pod::POM (); +use Scalar::Util (); use Storable (); # finally package CFClient::PodToPango; @@ -53,7 +54,7 @@ sub view_item { ("\t" x ($indent / 4)) . $_[1]->title->present ($_[0]) - . "\n" + . "\n\n" . $_[1]->content->present ($_[0]) } @@ -293,7 +294,7 @@ $w = undef; } ); - $entry->focus_in; + $entry->grab_focus; $w->show; } @@ -301,6 +302,9 @@ sub update_widgets { my ($self) = @_; + # necessary to avoid cyclic references + Scalar::Util::weaken $self; + my $button_cb = sub { my (undef, $ev, $x, $y) = @_; @@ -455,7 +459,8 @@ my $w = new CFClient::UI::FancyFrame title => "Bind Action", x => "center", - y => "center"; + y => "center", + z => 1000; $w->add (my $vb = new CFClient::UI::VBox); $vb->add (new CFClient::UI::Label @@ -486,14 +491,14 @@ return; } - $entry->focus_out; + $entry->grab_focus; $cb->($mod, $sym); $w->destroy }); - $entry->focus_in; + $entry->grab_focus; $w->show; }