*** empty log message ***
authorroot <root>
Wed, 18 Jan 2006 10:39:20 +0000 (10:39 +0000)
committerroot <root>
Wed, 18 Jan 2006 10:39:20 +0000 (10:39 +0000)
Changes
src/perl/selection-pastebin

diff --git a/Changes b/Changes
index 1446163ec8cfea0f705068777727224c663ce8de..7b6a3f679b2b255c34a3094304f6d94fb1f2a79a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,19 +1,17 @@
 rxvt-unicode changelog <= google-friendly title
 
-TODO: move pty/tty handling into a fork'ed server and drop all privs
+TODO: split perl documnetation and urxvt.pm into separate files
 TODO: harmonize --disable-options into position-dependent options.
 TODO: after requesting the selection and getting a timeout, no further requests will be sent.
 TODO: "slow" rendering mode for bidi and scripts
 TODO: read property sequence is broken with respect to utf-8 etc.
 TODO: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look.
-TODO: clarify and get rid of SMOOTH_REFRESH etc.
 WISH: perl extension for background image loading and moving the origin.
 WISH: OnTheSpot editing, or maybe switch to miiiiiiif. or maybe use perl and an overlay...
 WISH: just for fun, do shade and tint with XRender.
 WISH: support tex fonts
 
 9.0
-TODO: on_seelction_popup hook or so.
 TODO: distributed clipboard example
         - new script: perl/selection-pastebin
         - improved security of setuid/setgid operation, which is now
index 5bb7ab5dff1548df676254a67b55cbd4d830ebd9..fb1389ac3bc01e20b2b20d3efe6c9cda87a4d06f 100644 (file)
@@ -1,6 +1,5 @@
 #! perl
 
-my $timers = {};
 my $pastebin_cmd;
 my $pastebin_url;
 
@@ -16,7 +15,7 @@ sub upload_paste {
 
    my $msg = "uploaded $filename";
 
-   if (open my $o, ">$tmpfile") {
+   if (open my $o, ">", $tmpfile) {
       chmod 0644, $tmpfile;
       print $o $txt;
       close $o;
@@ -38,21 +37,20 @@ sub upload_paste {
 
    unlink $tmpfile;
 
-   my $ov = $timers->{ov} = $self->overlay (-1, 0, length ($msg), 1, urxvt::OVERLAY_RSTYLE, 0);
+   my $ov = $self->overlay (-1, 0, length $msg, 1, urxvt::OVERLAY_RSTYLE, 0);
    $ov->set (0, 0, $msg);
 
-   $timers->{t1} =
+   my $timer; $timer =
       urxvt::timer
               ->new
-              ->start ((int urxvt::NOW) + 5) # make sure we update "on" the second
-              ->interval (1)
-              ->cb (sub { delete $timers->{ov}; delete $timers->{t1}; });
+              ->start (urxvt::NOW + 5)
+              ->cb (sub {undef $timer; undef $ov; });
 }
 
 sub on_start {
    my ($self) = @_;
    $pastebin_cmd = $self->x_resource ("selection-pastebin.cmd")
-                   || "scp -p % ruth:/var/www/www.ta-sa.org/files/txt/";
+                   || "rcp -p % ruth:/var/www/www.ta-sa.org/files/txt/";
 
    $pastebin_url = $self->x_resource ("selection-pastebin.url")
                    || "http://www.ta-sa.org/files/txt/%";