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

Comparing rxvt-unicode/src/perl/urxvt-popup (file contents):
Revision 1.9 by root, Sun Jan 8 00:41:20 2006 UTC vs.
Revision 1.11 by root, Sun Jan 8 01:16:10 2006 UTC

8 8
9 my $cmd = "\x1b[H"; 9 my $cmd = "\x1b[H";
10 10
11 my $row = 1; 11 my $row = 1;
12 for my $item (@{ $self->{data}{item} }) { 12 for my $item (@{ $self->{data}{item} }) {
13 my $rend = "\x1b[30;47m"; 13 my $rend = "normal";
14 14
15 if ($row == $self->{hover}) { 15 if ($row == $self->{hover}) {
16 $rend = $self->{press} ? "\x1b[m" : "\x1b[30;46m"; 16 $rend = $self->{press} ? "active" : "hover";
17 } 17 }
18 18
19 $cmd .= "$rend\x1b[K"; 19 $cmd .= "$item->{rend}{$rend}\x1b[K";
20 $cmd .= $self->locale_encode ($item->{render}->($item)); 20 $cmd .= $self->locale_encode ($item->{render}->($item));
21 $cmd .= "\015\012"; 21 $cmd .= "\015\012";
22 22
23 $row++; 23 $row++;
24 } 24 }
109} 109}
110 110
111sub on_start { 111sub on_start {
112 my ($self) = @_; 112 my ($self) = @_;
113 113
114 $self->cmd_parse ("\x1b[?25l\x1b[?7l");
115 $self->refresh;
116
114 # might fail, but try anyways 117 # might fail, but try anyways
115 $self->grab ($self->{data}{event}{time}, 1) 118 $self->grab ($self->{data}{event}{time}, 1)
116 and $self->allow_events_async; 119 and $self->allow_events_async;
117 120
118 on_button_press $self, $self->{data}{event} if $self->{data}{event}{button}; 121 on_button_press $self, $self->{data}{event} if $self->{data}{event}{button};
119
120 $self->cmd_parse ("\x1b[?25l\x1b[?7l");
121 refresh $self;
122 122
123 () 123 ()
124} 124}
125 125
126sub on_map_notify { 126sub on_map_notify {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines