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

Comparing deliantra/Deliantra-Client/DC/Macro.pm (file contents):
Revision 1.20 by root, Tue Sep 2 04:30:46 2008 UTC vs.
Revision 1.22 by root, Sat Apr 3 02:58:24 2010 UTC

1package DC::Macro; 1package DC::Macro;
2 2
3use strict; 3use common::sense;
4 4
5use List::Util (); 5use List::Util ();
6use DC::UI; 6use DC::UI;
7 7
8our $REFRESH_MACRO_LIST; 8our $REFRESH_MACRO_LIST;
456 my ($widget, $ev) = @_; 456 my ($widget, $ev) = @_;
457 457
458 if ($ev->{button} == 1) { 458 if ($ev->{button} == 1) {
459 $edit_macro->($macro), 459 $edit_macro->($macro),
460 } elsif ($ev->{button} == 2) { 460 } elsif ($ev->{button} == 2) {
461 $::CONN->macro_send ($macro) if $::CONN; 461 execute ($macro);
462 } elsif ($ev->{button} == 3) { 462 } elsif ($ev->{button} == 3) {
463 (new DC::UI::Menu 463 (new DC::UI::Menu
464 items => [ 464 items => [
465 ["Edit" => sub { $edit_macro->($macro) }], 465 ["Edit" => sub { $edit_macro->($macro) }],
466 ["Invoke" => sub { $::CONN->macro_send ($macro) if $::CONN }], 466 ["Invoke" => sub { execute ($macro) }],
467 ["Delete" => sub { 467 ["Delete" => sub {
468 # might want to use grep instead 468 # might want to use grep instead
469 splice @{$::PROFILE->{macro}}, $idx, 1, (); 469 splice @{$::PROFILE->{macro}}, $idx, 1, ();
470 $refresh->(); 470 $refresh->();
471 }], 471 }],

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines