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.7 by root, Mon Jan 9 19:25:57 2006 UTC vs.
Revision 1.8 by root, Wed Jan 11 02:13:56 2006 UTC

11 }); 11 });
12} 12}
13 13
14sub on_start { 14sub on_start {
15 my ($self) = @_; 15 my ($self) = @_;
16
17 $self->{browser} = urxvt::untaint $self->x_resource ("urlLauncher") || "x-www-browser";
16 18
17 $self->grab_button (3, urxvt::ControlMask); 19 $self->grab_button (3, urxvt::ControlMask);
18} 20}
19 21
20sub on_button_press { 22sub on_button_press {
65 67
66 /[\\"'\ \t|&;<>()]/ 68 /[\\"'\ \t|&;<>()]/
67 and $add_button->("shell quote" => sub { $_ = "\Q$_" }); 69 and $add_button->("shell quote" => sub { $_ = "\Q$_" });
68 70
69 /^(http|ftp|telnet|irc|news):\// 71 /^(http|ftp|telnet|irc|news):\//
70 and $add_button->("run x-www-browser" => sub { system "x-www-browser \Q$_\E &" }); 72 and $add_button->("run $self->{browser}" => sub { system "$self->{browser} \Q$_\E &" });
71 } 73 }
72 74
73 $popup->show; 75 $popup->show;
74 76
75 return 1; 77 return 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines