… | |
… | |
72 | and $add_button->("shell quote" => sub { $_ = "\Q$_" }); |
72 | and $add_button->("shell quote" => sub { $_ = "\Q$_" }); |
73 | |
73 | |
74 | /^(http|ftp|telnet|irc|news):\// |
74 | /^(http|ftp|telnet|irc|news):\// |
75 | and $add_button->("run $self->{browser}" => sub { $self->exec_async ($self->{browser}, $_) }); |
75 | and $add_button->("run $self->{browser}" => sub { $self->exec_async ($self->{browser}, $_) }); |
76 | |
76 | |
77 | warn "hook for $self $self->{term}\n";#d# |
|
|
78 | for my $hook (@{ $self->{term}{selection_popup_hook} || [] }) { |
77 | for my $hook (@{ $self->{term}{selection_popup_hook} || [] }) { |
79 | if (my ($title, $cb) = $hook->($popup)) { |
78 | if (my ($title, $cb) = $hook->($popup)) { |
80 | $add_button->($title, $cb); |
79 | $add_button->($title, $cb); |
81 | } |
80 | } |
82 | } |
81 | } |