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

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.66 by root, Sun Jun 18 19:13:20 2006 UTC vs.
Revision 1.69 by root, Mon Jun 26 21:59:04 2006 UTC

195 } 195 }
196 } elsif ($sym == CFClient::SDLK_INSERT && $mod & CFClient::KMOD_CTRL) { 196 } elsif ($sym == CFClient::SDLK_INSERT && $mod & CFClient::KMOD_CTRL) {
197 $::BIND_EDITOR->set_binding (undef, undef, [], 197 $::BIND_EDITOR->set_binding (undef, undef, [],
198 sub { 198 sub {
199 my ($mod, $sym, $cmds) = @_; 199 my ($mod, $sym, $cmds) = @_;
200 $::CFG->{profile}{default}{bindings}{$mod}{$sym} = $cmds; 200 $::BIND_EDITOR->cfg_bind ($mod, $sym, $cmds);
201 }); 201 });
202 $::BIND_EDITOR->start; 202 $::BIND_EDITOR->start;
203 $::BIND_EDITOR->show; 203 $::BIND_EDITOR->show;
204 } elsif ($sym == CFClient::SDLK_INSERT && not ($mod & CFClient::KMOD_CTRL)) { 204 } elsif ($sym == CFClient::SDLK_INSERT && not ($mod & CFClient::KMOD_CTRL)) {
205 $::BIND_EDITOR->stop; 205 $::BIND_EDITOR->stop;
488 my ($entry, $ev, $x, $y) = @_; 488 my ($entry, $ev, $x, $y) = @_;
489 489
490 if ($ev->{button} == 3) { 490 if ($ev->{button} == 3) {
491 (new CFClient::UI::Menu 491 (new CFClient::UI::Menu
492 items => [ 492 items => [
493 ["bind <i>" . (CFClient::UI::Label::escape $self->{select}) . "</i> to a key"
493 ["bind to a key" => sub { $::BIND_EDITOR->do_quick_binding ([$self->{select}], sub { $entry->grab_focus }) }] 494 => sub { $::BIND_EDITOR->do_quick_binding ([$self->{select}], sub { $entry->grab_focus }) }]
494 ], 495 ],
495 )->popup ($ev); 496 )->popup ($ev);
496 return 1; 497 return 1;
497 } 498 }
498 0 499 0
505 if ($ev->{sym} == 13) { 506 if ($ev->{sym} == 13) {
506 if (exists $self->{select}) { 507 if (exists $self->{select}) {
507 $self->{last_command} = $self->{select}; 508 $self->{last_command} = $self->{select};
508 $::CONN->user_send ($self->{select}); 509 $::CONN->user_send ($self->{select});
509 510
510 unshift @{$self->{history}}, $self->{select}; 511 unshift @{$self->{history}}, $self->{entry}->get_text;
511 $self->{hist_ptr} = 0; 512 $self->{hist_ptr} = 0;
512 513
513 $self->hide; 514 $self->hide;
514 } 515 }
515 } elsif ($ev->{sym} == 27) { 516 } elsif ($ev->{sym} == 27) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines