[Xfce4-commits] [xfce/exo] 02/02: Add Geary mail
noreply at xfce.org
noreply at xfce.org
Sat Jul 8 11:59:24 CEST 2017
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/exo.
commit 0119075d725dbd832342c2073082c090df53fef3
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Jul 8 05:59:17 2017 -0400
Add Geary mail
---
exo-helper/helpers/Makefile.am | 1 +
exo-helper/helpers/exo-compose-mail-1 | 21 +++++++++++++++++++--
exo-helper/helpers/geary.desktop.in.in | 10 ++++++++++
po/POTFILES.in | 1 +
4 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/exo-helper/helpers/Makefile.am b/exo-helper/helpers/Makefile.am
index d1eb285..66f6bf0 100644
--- a/exo-helper/helpers/Makefile.am
+++ b/exo-helper/helpers/Makefile.am
@@ -18,6 +18,7 @@ desktop_in_in_files = \
evolution.desktop.in.in \
firefox.desktop.in.in \
galeon.desktop.in.in \
+ geary.desktop.in.in \
google-chrome.desktop.in.in \
gnome-terminal.desktop.in.in \
icecat.desktop.in.in \
diff --git a/exo-helper/helpers/exo-compose-mail-1 b/exo-helper/helpers/exo-compose-mail-1
index 1927a85..fead65c 100755
--- a/exo-helper/helpers/exo-compose-mail-1
+++ b/exo-helper/helpers/exo-compose-mail-1
@@ -168,7 +168,7 @@ elsif ($style eq 'sylpheed') {
if (@attachments > 0) {
push (@argv, '--attach');
for my $uri (@attachments) {
- # claws-mail supports URIs, sylpheed and older claws need
+ # claws-mail supports URIs, sylpheed and older claws need
# unescaped local paths
if ($binary eq 'claws-mail') {
push (@argv, $uri);
@@ -199,6 +199,24 @@ elsif ($style eq 'balsa') {
push (@argv, '--attach', $uri->path ());
}
}
+elsif ($style eq 'geary') {
+ # Geary supports everything but attachments
+ my $mailto = 'mailto:' . ((@to > 0) ? uri_escape($to[0]) : "") . '?';
+ for (my $n = 1; $n < @to; $n++) {
+ $mailto .= 'cc=' . uri_escape($to[$n]) . '&';
+ }
+ for my $cc (@cc) {
+ $mailto .= 'cc=' . uri_escape($cc) . '&';
+ }
+ for my $bcc (@bcc) {
+ $mailto .= 'bcc=' . uri_escape($bcc) . '&';
+ }
+ $subject and $mailto .= 'subject=' . uri_escape($subject) . '&';
+ $body and $mailto .= 'body=' . uri_escape($body);
+
+ # and add the parameters to the argv
+ push (@argv, $mailto);
+}
elsif ($style eq 'mutt') {
# generate the parameters for mutt
for my $cc (@cc) {
@@ -230,4 +248,3 @@ exec @argv;
# something went wrong
exit 1;
-
diff --git a/exo-helper/helpers/geary.desktop.in.in b/exo-helper/helpers/geary.desktop.in.in
new file mode 100644
index 0000000..8923b29
--- /dev/null
+++ b/exo-helper/helpers/geary.desktop.in.in
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Icon=geary
+Type=X-XFCE-Helper
+_Name=Geary
+StartupNotify=false
+X-XFCE-Binaries=geary
+X-XFCE-Category=MailReader
+X-XFCE-Commands=%B;
+X-XFCE-CommandsWithParameter=@HELPERDIR@/exo-compose-mail-1 geary %B "mailto:%s";
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 63757ed..0750add 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -57,6 +57,7 @@ exo-helper/helpers/eterm.desktop.in.in
exo-helper/helpers/evolution.desktop.in.in
exo-helper/helpers/firefox.desktop.in.in
exo-helper/helpers/galeon.desktop.in.in
+exo-helper/helpers/geary.desktop.in.in
exo-helper/helpers/google-chrome.desktop.in.in
exo-helper/helpers/gnome-terminal.desktop.in.in
exo-helper/helpers/icecat.desktop.in.in
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list