From: Paul Mangan Date: Thu, 24 Mar 2005 07:59:30 +0000 (+0000) Subject: clean up early morning mess (tsk) X-Git-Tag: rel_1_9_9~55 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=0367bbff145f8b0db7b44df08f008316a0354f03 clean up early morning mess (tsk) --- diff --git a/tools/acroread2sylpheed.pl b/tools/acroread2sylpheed.pl index b8b2fecb6..9620e149f 100644 --- a/tools/acroread2sylpheed.pl +++ b/tools/acroread2sylpheed.pl @@ -23,31 +23,20 @@ use strict; my $input = <>; -my $option; my $pdf; my $output = $ARGV; if ($ARGV =~ m/^\//) { - $option = "KMAIL or MUTT"; + $pdf = $output; } elsif ($ARGV =~ m/^mailto/) { - $option = "EVOLUTION"; + my @parts = split(/&[a-z]*=/, $output); + $parts[0] =~ s/^mailto:\?attach=//; + $pdf = $parts[0]; } elsif ($ARGV =~ m/^to/) { - $option = "MOZILLA or NETSCAPE"; -} else { - $option = "KMAIL"; -} - -if ($option eq "MOZILLA or NETSCAPE") { my @parts = split(/,/, $output); $parts[3] =~ s/^attachment=file:\/\///; $pdf = $parts[3]; -} elsif ($option eq "EVOLUTION") { - my @parts = split(/&[a-z]*=/, $output); - $parts[0] =~ s/^mailto:\?attach=//; - $pdf = $parts[0]; -} elsif ($option eq "KMAIL or MUTT") { - $pdf = $output; -} elsif ($option eq "KMAIL") { +} else { $pdf = $ENV{HOME}."/".$output; }