--- rxvt-unicode/src/urxvt.pm 2006/01/09 01:36:56 1.61 +++ rxvt-unicode/src/urxvt.pm 2006/01/09 19:28:39 1.66 @@ -335,6 +335,12 @@ Using this function has the advantage that its output ends up in the correct place, e.g. on stderr of the connecting urxvtc client. +=item $is_safe = urxvt::safe + +Returns true when it is safe to do potentially unsafe things, such as +evaluating perl code specified by the user. This is true when urxvt was +started setuid or setgid. + =item $time = urxvt::NOW Returns the "current time" (as per the event loop). @@ -913,6 +919,14 @@ Return various integers describing terminal characteristics. +=item $lc_ctype = $term->locale + +Returns the LC_CTYPE category string used by this rxvt-unicode. + +=item $x_display = $term->display_id + +Return the DISPLAY used by rxvt-unicode. + =item $modifiermask = $term->ModLevel3Mask =item $modifiermask = $term->ModMetaMask @@ -1111,7 +1125,7 @@ =item $success = $term->grab_button ($button, $modifiermask) -Registers a synchronous button grab. See XGrabButton. +Registers a synchronous button grab. See the XGrabButton manpage. =item $success = $term->grab ($eventtime[, $sync]) @@ -1169,7 +1183,7 @@ $self->add_item ({ rend => { normal => "\x1b[0;30;47m", hover => "\x1b[0;30;47m", active => "\x1b[0;30;47m" }, text => "", - render => sub { $sep x $urxvt::TERM->ncol }, + render => sub { $sep x $self->{term}->ncol }, activate => sub { }, }); } @@ -1187,7 +1201,7 @@ sub add_button { my ($self, $text, $cb) = @_; - $self->add_item ({ type => "button", text => "[ $text ]", activate => $cb}); + $self->add_item ({ type => "button", text => $text, activate => $cb}); } sub add_toggle { @@ -1209,8 +1223,11 @@ local $urxvt::popup::self = $self; + local $ENV{LC_ALL} = $self->{term}->locale; + urxvt->new ("--perl-lib" => "", "--perl-ext-common" => "", "-pty-fd" => -1, "-sl" => 0, "-b" => 0, "--transient-for" => $self->{term}->parent, + "-display" => $self->{term}->display_id, "-pe" => "urxvt-popup") or die "unable to create popup window\n"; }