… | |
… | |
434 | $REFRESH_MACRO_LIST = $refresh = sub { |
434 | $REFRESH_MACRO_LIST = $refresh = sub { |
435 | $macrolist->clear; |
435 | $macrolist->clear; |
436 | |
436 | |
437 | $macrolist->add_at (0, 1, new DC::UI::Label |
437 | $macrolist->add_at (0, 1, new DC::UI::Label |
438 | text => "Trigger", |
438 | text => "Trigger", |
|
|
439 | tooltip => $tooltip_trigger . $tooltip_common, |
|
|
440 | ); |
|
|
441 | $macrolist->add_at (1, 1, new DC::UI::Label |
|
|
442 | text => "Actions", |
439 | align => 0, |
443 | align => 0, |
440 | tooltip => $tooltip_trigger . $tooltip_common, |
|
|
441 | ); |
|
|
442 | $macrolist->add_at (1, 1, new DC::UI::Label |
|
|
443 | text => "Commands", |
|
|
444 | tooltip => $tooltip_commands . $tooltip_common, |
444 | tooltip => $tooltip_commands . $tooltip_common, |
445 | ); |
445 | ); |
446 | |
446 | |
447 | for my $idx (0 .. $#{$::PROFILE->{macro} || []}) { |
447 | for my $idx (0 .. $#{$::PROFILE->{macro} || []}) { |
448 | my $macro = $::PROFILE->{macro}[$idx]; |
448 | my $macro = $::PROFILE->{macro}[$idx]; |
… | |
… | |
475 | }; |
475 | }; |
476 | |
476 | |
477 | $macrolist->add_at (0, $y, new DC::UI::Label |
477 | $macrolist->add_at (0, $y, new DC::UI::Label |
478 | text => trigger_to_string $macro, |
478 | text => trigger_to_string $macro, |
479 | tooltip => $tooltip_trigger . $tooltip_common, |
479 | tooltip => $tooltip_trigger . $tooltip_common, |
480 | align => 0, |
480 | fg => [1, 0.8, 0.8], |
481 | can_hover => 1, |
481 | can_hover => 1, |
482 | can_events => 1, |
482 | can_events => 1, |
483 | on_button_down => $macro_cb, |
483 | on_button_down => $macro_cb, |
484 | ); |
484 | ); |
485 | |
485 | |
486 | $macrolist->add_at (1, $y, new DC::UI::Label |
486 | $macrolist->add_at (1, $y, new DC::UI::Label |
487 | text => (join "; ", @{ $macro->{action} || [] }), |
487 | text => (join "; ", @{ $macro->{action} || [] }), |
488 | tooltip => $tooltip_commands . $tooltip_common, |
488 | tooltip => $tooltip_commands . $tooltip_common, |
|
|
489 | fg => [0.9, 0.9, 0.9], |
|
|
490 | align => 0, |
489 | expand => 1, |
491 | expand => 1, |
490 | ellipsise => 3, |
492 | ellipsise => 3, |
491 | can_hover => 1, |
493 | can_hover => 1, |
492 | can_events => 1, |
494 | can_events => 1, |
493 | on_button_down => $macro_cb, |
495 | on_button_down => $macro_cb, |