clean up early morning mess (tsk)
[claws.git] / tools / acroread2sylpheed.pl
index b8b2fecb600a49f9e0b900e7ca8407bc7b15ec68..9620e149fb79f2fe08c8697bdfdc30464b67a013 100644 (file)
@@ -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;
 }