claws-mail-kdeservicemenu.pl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/perl
  2. # * Copyright 2004-2006 Paul Mangan <paul@claws-mail.org>
  3. # *
  4. # * This file is free software; you can redistribute it and/or modify it
  5. # * under the terms of the GNU General Public License as published by
  6. # * the Free Software Foundation; either version 3 of the License, or
  7. # * (at your option) any later version.
  8. # *
  9. # * This program is distributed in the hope that it will be useful, but
  10. # * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. # * General Public License for more details.
  13. # *
  14. # * You should have received a copy of the GNU General Public License
  15. # * along with this program; if not, write to the Free Software
  16. # * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. unless ($ARGV[0]) { exit; }
  18. my $claws = "claws-mail --compose --attach";
  19. my $sel = split_parts();
  20. exec "$claws $sel";
  21. exit;
  22. sub split_parts {
  23. my $selectedParts = "";
  24. my $count = 0;
  25. while ($ARGV[$count]) {
  26. $selectedParts .= "\"$ARGV[$count]\" ";
  27. $count++;
  28. }
  29. return ($selectedParts);
  30. }