From 9bf1ded169bc7fbb19b60b9a60d20e66ca5771fa Mon Sep 17 00:00:00 2001 From: Igor Murzov Date: Fri, 12 Jul 2013 04:24:56 +0400 Subject: [PATCH] xdg-open: Detect Enlightenment and make use of it Reviewed-by: Carsten Haitzler --- ChangeLog | 3 +++ scripts/xdg-open.in | 15 +++++++++++++++ scripts/xdg-utils-common.in | 4 ++++ 3 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9e4217b..943c141 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ === xdg-utils 1.1.x === +2013-07-13 Igor Murzov + * xdg-open: detect Enlightenment and make use of it + 2012-10-08 Rex Dieter * xdg-mime does not search mimeinfo.cache (BR31629) diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index 0934142..87e161d 100644 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -114,6 +114,17 @@ open_xfce() fi } +open_enlightenment() +{ + enlightenment_open "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + #----------------------------------------- # Recursively search .desktop file @@ -347,6 +358,10 @@ case "$DE" in open_lxde "$url" ;; + enlightenment) + open_enlightenment "$url" + ;; + generic) open_generic "$url" ;; diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in index 171d1e7..d20d4ef 100644 --- a/scripts/xdg-utils-common.in +++ b/scripts/xdg-utils-common.in @@ -256,6 +256,9 @@ detectDE() if [ -n "${XDG_CURRENT_DESKTOP}" ]; then case "${XDG_CURRENT_DESKTOP}" in + ENLIGHTENMENT) + DE=enlightenment; + ;; GNOME) DE=gnome; ;; @@ -282,6 +285,7 @@ detectDE() 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 xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce + elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; fi fi -- 1.8.3