add xdg-email as the default email route

f41
Caolán McNamara 8 years ago
parent ab3939b939
commit ab671b51c6

@ -0,0 +1,45 @@
From 5f58670b43e5284d9460b561e774175c7a2dd7ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 13 Sep 2016 10:42:16 +0100
Subject: [PATCH] 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
Change-Id: Ife1b56ccfe2434eb31ad67bef00f55197e96151e
---
shell/source/unix/misc/senddoc.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
index 169af25..4519e01 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
;;
*)
--
2.7.4

@ -242,6 +242,7 @@ Patch12: 0001-Related-rhbz-1351369-gtk3-clipboards-have-to-live-to.patch
Patch13: 0001-gtk3-style-combobox-never-becomes-sensitive-if-it-st.patch Patch13: 0001-gtk3-style-combobox-never-becomes-sensitive-if-it-st.patch
Patch14: 0001-Resolves-tdf-91533-rhbz-1364335-Tooltips-are-truncat.patch Patch14: 0001-Resolves-tdf-91533-rhbz-1364335-Tooltips-are-truncat.patch
Patch15: 0001-Resolves-tdf-101165-crash-on-deselecting-all-filters.patch Patch15: 0001-Resolves-tdf-101165-crash-on-deselecting-all-filters.patch
Patch16: 0001-add-xdg-email-as-the-default-email-route.patch
%if 0%{?rhel} %if 0%{?rhel}
# not upstreamed # not upstreamed

Loading…
Cancel
Save