Index: scripts/xdg-email |
=================================================================== |
--- scripts/xdg-email (revision 79914) |
+++ scripts/xdg-email (working copy) |
@@ -360,9 +360,34 @@ |
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; |
elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; |
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; |
- elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde; |
- else DE="" |
fi |
+ |
+ if [ x"$DE" = x"" ]; then |
+ # fallback to checking $DESKTOP_SESSION |
+ case "$DESKTOP_SESSION" in |
+ LXDE) |
+ DE=lxde; |
+ ;; |
+ xfce|xfce4) |
+ DE=xfce; |
+ ;; |
+ esac |
+ fi |
+ |
+ if [ x"$DE" = x"" ]; then |
+ # fallback to uname output for other platforms |
+ case "$(uname 2>/dev/null)" in |
+ Darwin) |
+ DE=darwin; |
+ ;; |
+ esac |
+ fi |
+ |
+ if [ x"$DE" = x"gnome" ]; then |
+ # gnome-default-applications-properties is only available in GNOME 2.x |
+ # but not in GNOME 3.x |
+ which gnome-default-applications-properties 2> /dev/null || DE="gnome3" |
+ fi |
} |
#---------------------------------------------------------------------------- |
@@ -473,6 +498,32 @@ |
fi |
} |
+open_gnome3() |
+{ |
+ local client |
+ local desktop |
+ desktop=`xdg-mime query default "x-scheme-handler/mailto"` |
+ client=`desktop_file_to_binary "$browser"` |
+ echo $client | grep thunderbird > /dev/null 2>&1 |
+ if [ $? -eq 0 ] ; then |
+ run_thunderbird "$client" "$1" |
+ fi |
+ |
+ if gvfs-open --help 2>/dev/null 1>&2; then |
+ DEBUG 1 "Running gvfs-open \"$1\"" |
+ gvfs-open "$1" |
+ else |
+ DEBUG 1 "Running gnome-open \"$1\"" |
+ gnome-open "$1" |
+ fi |
+ |
+ if [ $? -eq 0 ]; then |
+ exit_success |
+ else |
+ exit_failure_operation_failed |
+ fi |
+} |
+ |
open_gnome() |
{ |
local client |
@@ -713,6 +764,10 @@ |
open_gnome "${mailto}" |
;; |
+ gnome3) |
+ open_gnome3 "${mailto}" |
+ ;; |
+ |
xfce) |
open_xfce "${mailto}" |
;; |