summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-13 10:42:16 +0100
committerMichael Stahl <mstahl@redhat.com>2017-01-05 21:35:39 +0000
commit69954cc174f10fbf511a1aa14cf784e54259861c (patch)
treef8957cc7e13db0f558823d9e1cfce82b66c8809d /shell
parentf9c3998c2260995cccce060d1226b47ac2dc8c2d (diff)
Resolves: tdf#105096 add xdg-email as the default email route
because xdg-email is apparently the only route that knows how to support adding an attachment to thunderbird (cherry picked from commit 5f58670b43e5284d9460b561e774175c7a2dd7ab) Change-Id: Ife1b56ccfe2434eb31ad67bef00f55197e96151e Reviewed-on: https://gerrit.libreoffice.org/32756 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'shell')
-rwxr-xr-xshell/source/unix/misc/senddoc.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
index 169af259f220..4519e01f26e2 100755
--- a/shell/source/unix/misc/senddoc.sh
+++ b/shell/source/unix/misc/senddoc.sh
@@ -384,7 +384,9 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
# Try to be smart, and send the mail anyway, if we have the
# possibility to do so.
- if [ -n "$DESKTOP_LAUNCH" ]; then
+ if [ -x /usr/bin/xdg-email ] ; then
+ MAILER=/usr/bin/xdg-email
+ elif [ -n "$DESKTOP_LAUNCH" ]; then
# http://lists.freedesktop.org/pipermail/xdg/2004-August/002873.html
MAILER=${DESKTOP_LAUNCH}
elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kde-open ] ; then
@@ -423,7 +425,11 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
shift
;;
--attach)
- MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | "${URI_ENCODE}"`
+ if [ "$MAILER" = "/usr/bin/xdg-email" ]; then
+ MAILTO="${MAILTO:-}${MAILTO:+&}attach="`echo "file://$2" | "${URI_ENCODE}"`
+ else
+ MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | "${URI_ENCODE}"`
+ fi
shift
;;
*)