ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/option-popup
(Generate patch)

Comparing rxvt-unicode/src/perl/option-popup (file contents):
Revision 1.7 by root, Mon Jan 9 00:34:36 2006 UTC vs.
Revision 1.11 by root, Tue Oct 3 12:13:57 2006 UTC

2 2
3sub on_start { 3sub on_start {
4 my ($self) = @_; 4 my ($self) = @_;
5 5
6 $self->grab_button (2, urxvt::ControlMask); 6 $self->grab_button (2, urxvt::ControlMask);
7
8 ()
7} 9}
8 10
9sub on_button_press { 11sub on_button_press {
10 my ($self, $event) = @_; 12 my ($self, $event) = @_;
11 13
17 $popup->add_separator; 19 $popup->add_separator;
18 20
19 my %unsafe = map +($_ => 1), 21 my %unsafe = map +($_ => 1),
20 qw(borderLess console iconic loginShell reverseVideo 22 qw(borderLess console iconic loginShell reverseVideo
21 scrollBar scrollBar_floating scrollBar_right 23 scrollBar scrollBar_floating scrollBar_right
22 secondaryScreen transparent utmpInhibit meta8); 24 secondaryScreen transparent utmpInhibit meta8
25 override_redirect);
23 26
24 for my $name (sort keys %urxvt::OPTION) { 27 for my $name (sort keys %urxvt::OPTION) {
25 next if $unsafe{$name}; 28 next if $unsafe{$name};
26 29
27 my $optval = $urxvt::OPTION{$name}; 30 my $optval = $urxvt::OPTION{$name};
28 31
29 $popup->add_toggle ($name => sub { $self->option ($optval, $_[0]) }, 32 $popup->add_toggle ($name => $self->option ($optval),
30 $self->option ($optval)); 33 sub { $self->option ($optval, $_[0]) });
34 }
35
36 for my $hook (@{ $self->{term}{option_popup_hook} || [] }) {
37 if (my ($name, $value, $cb) = $hook->($popup)) {
38 $popup->add_toggle ($name => $value, sub { $cb->($_[0]) });
39 }
40 }
41
42 {
43 $popup->add_separator;
44 my $locale = $self->locale;
45 $locale =~ y/\x20-\x7e//cd;
46 $popup->add_title ("Locale: $locale");
31 } 47 }
32 48
33 $popup->show; 49 $popup->show;
34 50
35 return 1; 51 return 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines