X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=tools%2Facroread2sylpheed.pl;h=581ee6e684798ef21d34d9ebc012cc2ef1fd2258;hp=b8b2fecb600a49f9e0b900e7ca8407bc7b15ec68;hb=0fb1da70c023de70382e6c7671972fa795358669;hpb=15156596b3fd45da426f6523536542896251ddbe diff --git a/tools/acroread2sylpheed.pl b/tools/acroread2sylpheed.pl index b8b2fecb6..581ee6e68 100644 --- a/tools/acroread2sylpheed.pl +++ b/tools/acroread2sylpheed.pl @@ -14,45 +14,34 @@ # * # * You should have received a copy of the GNU General Public License # * along with this program; if not, write to the Free Software -# * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # acroread2sylpheed.pl helper script to send documents from -# Adobe Reader 7 to sylpheed +# Adobe Reader 7 to sylpheed-claws 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; } -exec "sylpheed --attach \"$pdf\""; +exec "sylpheed-claws --attach \"$pdf\""; ## if necessary, change the line above to point to -## your sylpheed executable +## your sylpheed-claws executable -exit; \ No newline at end of file +exit;