sensible-lomua
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Thu, 13 Jan 2022 22:04:21 +0000 (22:04 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 13 Jan 2022 22:04:21 +0000 (22:04 +0000)
===================================================================

Gbp-Pq: Name sensible-lomua.diff

officecfg/registry/data/org/openoffice/Office/Common.xcu
shell/source/unix/misc/senddoc.sh

index d9c2d5df34e3e77606b37009d41999e0b63d84db..3cc1c1e9ab83469c86f1dd2216957d957e2fffa3 100644 (file)
   </node>
   <node oor:name="ExternalMailer" install:module="unixdesktop">
     <prop oor:name="Program">
-      <value oor:external="com.sun.star.configuration.backend.DesktopBackend ExternalMailer"/>
+      <value>sensible-lomua</value>
     </prop>
   </node>
   <node oor:name="Font">
index d4f9b08de89c69996538f5abdeca8f0ede0ac4a9..03a19782411223d6d5f5cce5a3a76f2619fa14b6 100755 (executable)
@@ -77,6 +77,32 @@ if [ "$1" = "--mailclient" ]; then
     shift
 fi
 
+case `basename "$MAILER"` in
+    sensible-lomua)
+        if [ -x /usr/bin/xdg-email ] ; then
+            MAILER=/usr/bin/xdg-email
+        elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kde-open ] \
+           || [ -x /usr/bin/gnome-open ] \
+           || [ -x /usr/bin/xdg-open ]; then
+            # use an undefined mailer, to trigger the default handling
+            MAILER=undefined
+        elif [ -n "$GNOME_DESKTOP_SESSION_ID" -a -x /usr/bin/evolution ]; then
+            MAILER=/usr/bin/evolution
+        elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kmail ]; then
+            MAILER=/usr/bin/kmail
+        elif [ -x /usr/bin/evolution ]; then
+            # default
+            MAILER=/usr/bin/evolution
+        elif [ -x /usr/bin/icedove ]; then
+            # fallback
+            MAILER=/usr/bin/icedove
+        elif [ -x /usr/bin/thunderbird ]; then
+            # fallback
+            MAILER=/usr/bin/thunderbird
+        fi
+        ;;
+esac
+
 # autodetect mail client from executable name
 case $(basename "$MAILER" | sed 's/-.*$//') in