ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/option-popup
Revision: 1.8
Committed: Fri Jan 20 10:27:08 2006 UTC (18 years, 4 months ago) by root
Branch: MAIN
CVS Tags: rel-7_3, rel-7_2, rel-7_5, rel-7_4, rel-7_3a
Changes since 1.7: +2 -0 lines
Log Message:
*** empty log message ***

File Contents

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