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

File Contents

# User Rev Content
1 root 1.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 root 1.3 secondaryScreen transparent utmpInhibit meta8);
13 root 1.1
14     for my $name (sort keys %urxvt::OPTION) {
15     next if $unsafe{$name};
16    
17     my $optval = $urxvt::OPTION{$name};
18    
19 root 1.2 $popup->add_toggle ($name => sub { $self->option ($optval, $_[0]) },
20 root 1.1 $self->option ($optval));
21     }
22    
23     $popup->show;
24    
25     return 1;
26     }
27    
28     ()
29     }
30