ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/option-popup
Revision: 1.2
Committed: Sun Jan 8 00:29:58 2006 UTC (18 years, 4 months ago) by root
Branch: MAIN
Changes since 1.1: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #! perl
2
3 sub on_button_press {
4 my ($self, $event) = @_;
5
6 if ($event->{button} == 3 && $event->{state} & urxvt::ControlMask) {
7 my $popup = $self->popup ($event);
8
9 my %unsafe = map +($_ => 1),
10 qw(borderLess console iconic loginShell reverseVideo
11 scrollBar scrollBar_floating scrollBar_right
12 secondaryScreen transparent utmpInhibit);
13
14 for my $name (sort keys %urxvt::OPTION) {
15 next if $unsafe{$name};
16
17 my $optval = $urxvt::OPTION{$name};
18
19 $popup->add_toggle ($name => sub { $self->option ($optval, $_[0]) },
20 $self->option ($optval));
21 }
22
23 $popup->show;
24
25 return 1;
26 }
27
28 ()
29 }
30