ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/selection-popup
(Generate patch)

Comparing rxvt-unicode/src/perl/selection-popup (file contents):
Revision 1.23 by root, Tue Jan 4 21:35:35 2011 UTC vs.
Revision 1.25 by root, Wed Jun 6 15:06:41 2012 UTC

1#! perl 1#! perl
2
3#:META:X_RESOURCE:url-launcher:string:shell command to use
2 4
3sub msg { 5sub msg {
4 my ($self, $msg) = @_; 6 my ($self, $msg) = @_;
5 7
6 my $overlay = $self->overlay (0, 0, $self->strwidth ($msg), 1); 8 my $overlay = $self->overlay (0, 0, $self->strwidth ($msg), 1);
12} 14}
13 15
14sub on_start { 16sub on_start {
15 my ($self) = @_; 17 my ($self) = @_;
16 18
17 $self->{browser} = $self->x_resource ("urlLauncher") || "sensible-browser"; 19 $self->{browser} = $self->x_resource ("url-launcher") || "sensible-browser";
18 20
19 $self->grab_button (3, urxvt::ControlMask); 21 $self->grab_button (3, urxvt::ControlMask);
20 22
21 () 23 ()
22} 24}
61 63
62 /./ 64 /./
63 and $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); 65 and $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ });
64 66
65 /./ 67 /./
66 and $add_button->("eval perl expression" => sub { no warnings; $_ = eval $_ }); 68 and $add_button->("eval perl expression" => sub { my $self = $self; no warnings; $_ = eval $_; $_ = "$@" if $@ });
67 69
68 /./ 70 /./
69 and $add_button->((sprintf "to unicode hex index (%x)", ord) => sub { $_ = sprintf "%x", ord }); 71 and $add_button->((sprintf "to unicode hex index (%x)", ord) => sub { $_ = sprintf "%x", ord });
70 72
71 /(\S+):(\d+):?/ 73 /(\S+):(\d+):?/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines