Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/xdg-utils/scripts/xdg-open.in

Issue 6758016: Update xdg-utils to the latest version available in CVS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/xdg-utils/scripts/xdg-open ('k') | third_party/xdg-utils/scripts/xdg-su.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/xdg-utils/scripts/xdg-open.in
===================================================================
--- third_party/xdg-utils/scripts/xdg-open.in (revision 79890)
+++ third_party/xdg-utils/scripts/xdg-open.in (working copy)
@@ -6,6 +6,8 @@
#
# Refer to the usage() function below for usage.
#
+# Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
+# Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
# Copyright 2006, Jeremy White <jwhite@codeweavers.com>
#
@@ -161,6 +163,32 @@
exit_failure_operation_impossible "no method available for opening '$1'"
}
+open_lxde()
+{
+ # pcmanfm only knows how to handle file:// urls and filepaths, it seems.
+ if (echo "$1" | grep -q '^file://' ||
+ ! echo "$1" | egrep -q '^[a-zA-Z+\.\-]+:')
+ then
+ local file="$(echo "$1" | sed 's%^file://%%')"
+
+ # handle relative paths
+ if ! echo "$file" | grep -q '^/'; then
+ file="$(pwd)/$file"
+ fi
+
+ pcmanfm "$file"
+
+ else
+ open_generic "$1"
+ fi
+
+ if [ $? -eq 0 ]; then
+ exit_success
+ else
+ exit_failure_operation_failed
+ fi
+}
+
[ x"$1" != x"" ] || exit_failure_syntax
url=
@@ -213,6 +241,10 @@
open_xfce "$url"
;;
+ lxde)
+ open_lxde "$url"
+ ;;
+
generic)
open_generic "$url"
;;
« no previous file with comments | « third_party/xdg-utils/scripts/xdg-open ('k') | third_party/xdg-utils/scripts/xdg-su.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698