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

File Contents

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