diff options
| author | Rex Dieter <rdieter@fedoraproject.org> | 2011-03-31 09:58:41 -0500 |
|---|---|---|
| committer | Rex Dieter <rdieter@fedoraproject.org> | 2011-03-31 09:58:41 -0500 |
| commit | ca33e673f7fd9173267843aac9668f692d48d6da (patch) | |
| tree | 16e2c283c8dc7f75782c080e8da8fab8babd3719 | |
| parent | 666d65cae0f2e66d33ec0dc48c054afbf16c9e3f (diff) | |
Initial support for DE=Darwin, Default for $BROWSER under Mac OS (BR35500)
| -rw-r--r-- | ChangeLog | 1 | ||||
| -rw-r--r-- | scripts/xdg-open.in | 11 | ||||
| -rw-r--r-- | scripts/xdg-utils-common.in | 11 |
3 files changed, 22 insertions, 1 deletions
@@ -3,6 +3,7 @@ 2011-03-31 Rex Dieter <rdieter@fedoraproject.org> * Don't overwrite a /usr/share/applications/defaults.list symlink (BR35794) * Use D-Bus API for GNOME screensaver (BR29860) + * Initial support for DE=Darwin, Default for $BROWSER under Mac OS (BR35500) 2011-03-28 Rex Dieter <rdieter@fedoraproject.org> * xdg-open cannot detect xfce 4.8 correctly (BR33321) diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index 8fe3beb..b3cb500 100644 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -42,6 +42,17 @@ last_word() echo "$rest" } +open_darwin() +{ + open "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + open_kde() { if kde-open -v 2>/dev/null 1>&2; then diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in index 80e0fd5..5ec2585 100644 --- a/scripts/xdg-utils-common.in +++ b/scripts/xdg-utils-common.in @@ -200,7 +200,7 @@ detectDE() fi if [ x"$DE" = x"" ]; then - # if all else fails, fallback to checking $DESKTOP_SESSION + # fallback to checking $DESKTOP_SESSION case "$DESKTOP_SESSION" in LXDE) DE=lxde; @@ -211,6 +211,15 @@ detectDE() 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 |
