2006-12-01 [paul] 2.6.0cvs74
authorPaul Mangan <paul@claws-mail.org>
Fri, 1 Dec 2006 10:18:26 +0000 (10:18 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 1 Dec 2006 10:18:26 +0000 (10:18 +0000)
* tools/kdeservicemenu/README
* tools/kdeservicemenu/claws-mail-kdeservicemenu.pl
* tools/kdeservicemenu/install.sh
* tools/kdeservicemenu/template_claws-mail-attach-files.desktop
* tools/kdeservicemenu/template_claws-mail-compress-attach.desktop
simplify this stuff, and in so doing,
fix it. (possibly re-extend it again at
a later date)

ChangeLog
PATCHSETS
configure.ac
tools/kdeservicemenu/README
tools/kdeservicemenu/claws-mail-kdeservicemenu.pl
tools/kdeservicemenu/install.sh
tools/kdeservicemenu/template_claws-mail-attach-files.desktop
tools/kdeservicemenu/template_claws-mail-compress-attach.desktop [deleted file]

index 04a11c4..c0aa675 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-12-01 [paul]      2.6.0cvs74
+
+       * tools/kdeservicemenu/README
+       * tools/kdeservicemenu/claws-mail-kdeservicemenu.pl
+       * tools/kdeservicemenu/install.sh
+       * tools/kdeservicemenu/template_claws-mail-attach-files.desktop
+       * tools/kdeservicemenu/template_claws-mail-compress-attach.desktop
+               simplify this stuff, and in so doing,
+               fix it. (possibly re-extend it again at
+               a later date)
+
 2006-12-01 [wwp]       2.6.0cvs73
 
        * src/gtk/quicksearch.c
index 34b7db9..556640b 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.269 -r 1.395.2.270 src/summaryview.c;  ) > 2.6.0cvs71.patchset
 ( cvs diff -u -r 1.9.2.30 -r 1.9.2.31 src/common/defs.h;  cvs diff -u -r 1.204.2.109 -r 1.204.2.110 src/prefs_common.c;  cvs diff -u -r 1.103.2.67 -r 1.103.2.68 src/prefs_common.h;  cvs diff -u -r 1.3.12.18 -r 1.3.12.19 src/message_search.c;  cvs diff -u -r 1.15.2.36 -r 1.15.2.37 src/summary_search.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/gtk/combobox.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/gtk/combobox.h;  ) > 2.6.0cvs72.patchset
 ( cvs diff -u -r 1.1.2.53 -r 1.1.2.54 src/gtk/quicksearch.c;  ) > 2.6.0cvs73.patchset
+( cvs diff -u -r 1.2.2.8 -r 1.2.2.9 tools/kdeservicemenu/README;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 tools/kdeservicemenu/claws-mail-kdeservicemenu.pl;  cvs diff -u -r 1.2.2.4 -r 1.2.2.5 tools/kdeservicemenu/install.sh;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 tools/kdeservicemenu/template_claws-mail-attach-files.desktop;  cvs diff -u -r -1.1.2.1 -r -1.1.2.2 tools/kdeservicemenu/template_claws-mail-compress-attach.desktop;  ) > 2.6.0cvs74.patchset
index 86e7260..3db0912 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=73
+EXTRA_VERSION=74
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index df05a7b..b25884e 100644 (file)
@@ -1,32 +1,19 @@
-sylpheed-kdeservicemenu.pl 
-Version: 1.3
+claws-mail-kdeservicemenu.pl 
+Version: 1.4
 Claws Mail servicemenu for Konqueror
 
 FILES
 o README                       You're reading it
 o install.sh                   installer script
-o sylpheed-kdeservicemenu.pl   perl program
+o claws-mail-kdeservicemenu.pl perl program
 o template_sylpheed-attach-files.desktop
-o template_sylpheed-compress-attach.desktop
-                               .desktop file templates
+                               .desktop file template
 
 DESCRIPTION
-Enables attaching files from Konqueror to a new compose window
-or compression of files/directories and then attaching of
-the archive to a new compose window.
+Enables attaching files from Konqueror to a new compose window.
 
 Adds the following right-click menu item to Konqueror:
-/Claws Mail/Attach file(s)
-/Claws Mail/Attach as GZip File(s)
-/Claws Mail/Attach as BZip File(s)
-/Claws Mail/Attach as Tar Archive
-/Claws Mail/Attach as Bzipped Tar Archive
-/Claws Mail/Attach as Gzipped Tar Archive
-/Claws Mail/Attach as Zip Archive
-
-OPERATION
-All outputted files are created in /tmp
-Original files are preserved when creating [FILE].gz and [FILE].bz2
+/Claws Mail/Attach File(s)
 
 REQUIREMENTS
 Perl 5.x.x
index 3365a45..1d58b91 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-#  * Copyright 2004 Paul Mangan <paul@claws-mail.org>
+#  * Copyright 2004-2006 Paul Mangan <paul@claws-mail.org>
 #  *
 #  * This file is free software; you can redistribute it and/or modify it
 #  * under the terms of the GNU General Public License as published by
 unless ($ARGV[0]) { exit; }
 
 my $claws = "claws-mail --compose --attach";
-my $prefix = "/tmp/archive.";
-my $command = find_command($ARGV[0]);
-my ($sel,$att) = split_parts();
+my $sel = split_parts();
 
-if ($ARGV[0] eq "gz" || $ARGV[0] eq "bz2") {
-       exec "$sel$claws $att";
-} elsif ($ARGV[0] eq "attachfile") {
-       exec "$claws $sel";
-} else {
-       exec "$command $prefix$ARGV[0] $sel;"
-           ."$claws $prefix$ARGV[0]";
-}
+exec "$claws $sel";
 
 exit;
 
-sub find_command {
-       local($s) = @_;
-       my $com;
-       
-       if ($s eq "gz")         { $com = "gzip -c"; }
-       elsif ($s eq "bz2")     { $com = "bzip2 -c"; }
-       elsif ($s eq "zip")     { $com = "$s -r"; }
-       elsif ($s eq "tar")     { $com = "$s -c -f"; }
-       elsif ($s eq "tar.bz2") { $com = "tar -cj -f"; }
-       elsif ($s eq "tar.gz")  { $com = "tar -cz -f"; }
-       
-       return $com;
-}
-
 sub split_parts {
        my $selectedParts = "";
-       my $attachedParts = "";
+       my $count = 0;
 
-       for (my $count = $#ARGV; $count > 0; $count--) {
-               my @s = split("/", $ARGV[$count]);
-               my $p = pop(@s);
-               if ($ARGV[0] eq "gz" || $ARGV[0] eq "bz2") {
-                       my $psub = $p;
-                       $psub =~ s/\s/_/g;
-                       my $output = "/tmp/$psub.$ARGV[0]";
-                       $selectedParts .= "$command \"$p\" > $output;";
-                       $attachedParts .= "$output ";
-               } else {
-                       $selectedParts .= "\"$p\" ";
-               }
+       while ($ARGV[$count]) {
+               $selectedParts .= "\"$ARGV[$count]\" ";
+               $count++;
        }
-       return ($selectedParts,$attachedParts);
+
+       return ($selectedParts);
 }
index dfbc0ae..905f98a 100644 (file)
@@ -1,10 +1,8 @@
 #!/bin/bash
 
 PERL_SCRIPT="claws-mail-kdeservicemenu.pl"
-DESKTOP_TEMPLATE_ONE="template_claws-mail-attach-files.desktop"
-DESKTOP_ONE="claws-mail-attach-files.desktop"
-DESKTOP_TEMPLATE_TWO="template_claws-mail-compress-attach.desktop"
-DESKTOP_TWO="claws-mail-compress-attach.desktop"
+DESKTOP_TEMPLATE="template_claws-mail-attach-files.desktop"
+DESKTOP="claws-mail-attach-files.desktop"
 SERVICEMENU_DIR="share/apps/konqueror/servicemenus"
 
 function check_environ {
@@ -19,35 +17,27 @@ if [ -z "$(type 'kde-config' 2> /dev/null)" ]; then
     export PATH=$PATH:$KDEDIR/bin
   fi
 fi
-echo "Okay."
+echo "OK"
 }
 
 function install_all {
-echo "Generating $DESKTOP_ONE ..."
+echo "Generating $DESKTOP ..."
 SED_PREFIX=${PREFIX//\//\\\/}
-sed "s/SCRIPT_PATH/$SED_PREFIX\\/bin\\/$PERL_SCRIPT/" $DESKTOP_TEMPLATE_ONE > $DESKTOP_ONE
-echo "Installing $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE"
-mv -f $DESKTOP_ONE $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE
-echo "Generating $DESKTOP_TWO ..."
-SED_PREFIX=${PREFIX//\//\\\/}
-sed "s/SCRIPT_PATH/$SED_PREFIX\\/bin\\/$PERL_SCRIPT/" $DESKTOP_TEMPLATE_TWO > $DESKTOP_TWO
-echo "Installing $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO"
-mv -f $DESKTOP_TWO $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO
+sed "s/SCRIPT_PATH/$SED_PREFIX\\/bin\\/$PERL_SCRIPT/" $DESKTOP_TEMPLATE > $DESKTOP
+echo "Installing $PREFIX/$SERVICEMENU_DIR/$DESKTOP"
+mv -f $DESKTOP $PREFIX/$SERVICEMENU_DIR/$DESKTOP
 echo "Installing $PREFIX/bin/$PERL_SCRIPT"
 cp -f $PERL_SCRIPT $PREFIX/bin/
 echo "Setting permissions ..."
-chmod 0644 $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE
-chmod 0644 $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO
+chmod 0644 $PREFIX/$SERVICEMENU_DIR/$DESKTOP
 chmod 0755 $PREFIX/bin/$PERL_SCRIPT
 echo "Finished installation."
 kdialog --msgbox "Finished installation."
 }
 
 function uninstall_all {
-echo "Removing $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE"
-rm $PREFIX/$SERVICEMENU_DIR/$DESKTOP_ONE
-echo "Removing $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO"
-rm $PREFIX/$SERVICEMENU_DIR/$DESKTOP_TWO
+echo "Removing $PREFIX/$SERVICEMENU_DIR/$DESKTOP"
+rm $PREFIX/$SERVICEMENU_DIR/$DESKTOP
 echo "Removing $PREFIX/bin/$PERL_SCRIPT"
 rm $PREFIX/bin/$PERL_SCRIPT
 echo "Finished uninstall."
index e1c29e6..33be8c7 100644 (file)
@@ -1,24 +1,13 @@
-[Desktop Action AttachFiles]
-Exec=SCRIPT_PATH attachfile %U
-Icon=claws-mail
-Name=Attach File(s)
-
-[Desktop Action BZipAndAttach]
-Exec=SCRIPT_PATH bz2 %U
-Icon=claws-mail
-Name=Attach as BZip File(s)
-
-[Desktop Action GZipAndAttach]
-Exec=SCRIPT_PATH gz %U
-Icon=claws-mail
-Name=Attach as GZip File(s)
-
 [Desktop Entry]
-Actions=AttachFiles;GZipAndAttach;BZipAndAttach;
-Comment=kde service menu for compressing and attaching files to Claws Mail
+Actions=AttachFiles;
+Comment=kde service menu for attaching files to Claws Mail
 Encoding=UTF8
-Icon=
-Name=Claws Mail compress and attach files
+Name=Claws Mail attach files
 ServiceTypes=all/allfiles
 X-KDE-Priority=TopLevel
 X-KDE-Submenu=Claws Mail
+
+[Desktop Action AttachFiles]
+Exec=SCRIPT_PATH %F
+Icon=claws-mail
+Name=Attach File(s)
diff --git a/tools/kdeservicemenu/template_claws-mail-compress-attach.desktop b/tools/kdeservicemenu/template_claws-mail-compress-attach.desktop
deleted file mode 100644 (file)
index a47faa4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-[Desktop Action TarAndAttach]
-Exec=SCRIPT_PATH tar %U
-Icon=claws-mail
-Name=Attach as Tar Archive
-
-[Desktop Action TarBzipAndAttach]
-Exec=SCRIPT_PATH tar.bz2 %U
-Icon=claws-mail
-Name=Attach as Bzipped Tar Archive
-
-[Desktop Action TarGzipAndAttach]
-Exec=SCRIPT_PATH tar.gz %U
-Icon=claws-mail
-Name=Attach as Gzipped Tar Archive
-
-[Desktop Action ZipAndAttach]
-Exec=SCRIPT_PATH zip %U
-Icon=claws-mail
-Name=Attach as Zip Archive
-
-[Desktop Entry]
-Actions=TarAndAttach;TarBzipAndAttach;TarGzipAndAttach;ZipAndAttach;
-Comment=kde service menu for compressing and attaching files/dirs to Claws Mail
-Encoding=UTF8
-Icon=
-Name=Claws Mail compress and attach files/dirs
-ServiceTypes=all/all
-X-KDE-Priority=TopLevel
-X-KDE-Submenu=Claws Mail