Update xdg-utils to the latest version available in CVS (they've switched to git), which includes our local changes since the last time we pulled from CVS. This is now a completely stock copy of xdg-utils, and I'll update it to the latest version in git after this.
BUG=73231
TEST=none
Review URL: http://codereview.chromium.org/6758016
git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/xdg-utils@79909 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/ChangeLog b/ChangeLog
index 2dfeed5..cb51c00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,18 +1,46 @@
=== xdg-utils 1.x.x ===
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
+2010-11-18 Rex Dieter <rdieter@fedoraproject.org>
+ * fixup kfmclient_fix_exit_code() for newer kde-config output
+ * fix typo in xdg-mime manpage
+ * xdg-email: Thunderbird is not detected with localized (BR31740)
+
+2010-10-28 Rex Dieter <rdieter@fedoraproject.org>
+ * add lxde support (BR26058)
+
+2010-09-25 Fathi Boudra <fabo@freedesktop.org>
+ * xdg-settings: Only run KDE browser fallback when necessary. Otherwise,
+ in some circumstances, read_kde_browser incorrectly prints the result
+ twice. Thanks to David Benjamin.
+
+2010-09-24 Fathi Boudra <fabo@freedesktop.org>
+ * xdg-email: Fix e-mail attachements support with Thunderbird3 (BR13435)
+
+2010-09-24 Fathi Boudra <fabo@freedesktop.org>
+ * xdg-mime: update the required section "[Added Associations]"
+ Thanks to Mike Mammarella:
+
+2010-09-24 Fathi Boudra <fabo@freedesktop.org>
+ * xdg-email: Fix missing backslash in awk script so that it works with
+ mawk.
+
+2010-09-24 Fathi Boudra <fabo@freedesktop.org>
+ * xdg-desktop-icon: set the execute bit to desktop file.
+ Thanks to Damjan Jovanovic. (BR28394)
+
+2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
* xdg-screensaver: consider gnome-screensaver a separate DE (BR20027)
2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
* xdg-mime : use 'gnomevfs-info --slow-mime' (BR 13939)
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
+2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
* xdg-desktop-icon : use localized desktop folder name (BR19011)
2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
* xdg-open : use mimeopen -L (follow symlinks)
-2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
+2010-07-09 Rex Dieter <rdieter@fedoraproject.org>
* xdg-open.1 : add FILES, SEE ALSO sections
2010-05-16 Rex Dieter <rdieter@fedoraproject.org>
diff --git a/README.chromium b/README.chromium
index c681ec4..63f3c48 100644
--- a/README.chromium
+++ b/README.chromium
@@ -3,7 +3,7 @@
Version: unknown
Description:
-This directory contains a copy of xdg-utils obtained from CVS on 2010-08-30,
+This directory contains a copy of xdg-utils obtained from CVS on 2010-12-31,
with this command:
cvs -d:pserver:anoncvs@anoncvs.freedesktop.org:/cvs/portland co -d xdg-utils portland/xdg-utils
diff --git a/scripts/man/xdg-mime.1 b/scripts/man/xdg-mime.1
index 587d306..f7c1d16 100644
--- a/scripts/man/xdg-mime.1
+++ b/scripts/man/xdg-mime.1
@@ -52,7 +52,7 @@
\fIapplication\fR
is the desktop file id of the application and has the form vendor\-name.desktop
\fIapplication\fR
-must already be installed in the desktop menu before it can be made the default handler. The aplication's desktop file must list support for all the MIME types that it wishes to be the default handler for.
+must already be installed in the desktop menu before it can be made the default handler. The application's desktop file must list support for all the MIME types that it wishes to be the default handler for.
.sp
Requests to make an application a default handler may be subject to system policy or approval by the end\-user. xdg\-mime query can be used to verify whether an application is the actual default handler for a specific file type.
.sp
diff --git a/scripts/xdg-copy.in b/scripts/xdg-copy.in
index 486728c..8387248 100644
--- a/scripts/xdg-copy.in
+++ b/scripts/xdg-copy.in
@@ -7,6 +7,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>
#
diff --git a/scripts/xdg-desktop-icon b/scripts/xdg-desktop-icon
index b7de83e..4969f47 100755
--- a/scripts/xdg-desktop-icon
+++ b/scripts/xdg-desktop-icon
@@ -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>
#
@@ -496,6 +498,7 @@
esac
my_umask=077
+desktop_dir="$HOME/Desktop"
if xdg-user-dir 2>/dev/null 1>&2; then
desktop_dir=`xdg-user-dir DESKTOP`
fi
@@ -534,6 +537,7 @@
if [ -n "$x" ]; then
mkdir -p "$x"
eval 'cp "$desktop_file" "$x/$basefile"'$xdg_redirect_output
+ chmod u+x "$x/$basefile"
fi
done
@@ -546,6 +550,7 @@
rm -f "$x/$basefile"
fi
done
+
;;
esac
diff --git a/scripts/xdg-desktop-icon.in b/scripts/xdg-desktop-icon.in
index 9d7e19c..af99d29 100644
--- a/scripts/xdg-desktop-icon.in
+++ b/scripts/xdg-desktop-icon.in
@@ -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>
#
@@ -136,6 +138,7 @@
if [ -n "$x" ]; then
mkdir -p "$x"
eval 'cp "$desktop_file" "$x/$basefile"'$xdg_redirect_output
+ chmod u+x "$x/$basefile"
fi
done
diff --git a/scripts/xdg-desktop-menu b/scripts/xdg-desktop-menu
index baeb42c..663289a 100755
--- a/scripts/xdg-desktop-menu
+++ b/scripts/xdg-desktop-menu
@@ -5,6 +5,8 @@
# Utility script to install menu items on a Linux desktop.
# 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>
#
diff --git a/scripts/xdg-desktop-menu.in b/scripts/xdg-desktop-menu.in
index 48d58a9..969f474 100644
--- a/scripts/xdg-desktop-menu.in
+++ b/scripts/xdg-desktop-menu.in
@@ -5,6 +5,8 @@
# Utility script to install menu items on a Linux desktop.
# 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>
#
diff --git a/scripts/xdg-email b/scripts/xdg-email
index fef44ad..0afc70e 100755
--- a/scripts/xdg-email
+++ b/scripts/xdg-email
@@ -7,6 +7,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>
#
@@ -396,7 +398,7 @@
BCC=$(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//' | awk '{ printf "%s,",$0 }')
SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
- ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//g' | awk '/^file:/ { printf "%s,",$0 }')
+ ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//g' | awk '/^file:/ { printf "%s,",$0 }' | sed 's/,$//')
if [ -z "$TO" ] ; then
NEWMAILTO=
@@ -542,7 +544,7 @@
c = substr ($0, i, 1)
if ( ord [c] > 127 ) {
e = e "%" sprintf("%02X", ord [c])
- } else if ( c ~ /[@a-zA-Z0-9.-\\/]/ ) {
+ } else if ( c ~ /[@a-zA-Z0-9.-\\\/]/ ) {
e = e c
} else {
e = e "%" sprintf("%02X", ord [c])
diff --git a/scripts/xdg-email.in b/scripts/xdg-email.in
index 4034639..cff0840 100644
--- a/scripts/xdg-email.in
+++ b/scripts/xdg-email.in
@@ -7,6 +7,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>
#
@@ -46,7 +48,7 @@
BCC=$(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//' | awk '{ printf "%s,",$0 }')
SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
- ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//g' | awk '/^file:/ { printf "%s,",$0 }')
+ ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//g' | awk '/^file:/ { printf "%s,",$0 }' | sed 's/,$//')
if [ -z "$TO" ] ; then
NEWMAILTO=
@@ -82,8 +84,9 @@
open_kde()
{
- local client
- client=`kreadconfig --file emaildefaults --group PROFILE_Default --key EmailClient | cut -d ' ' -f 1`
+ local client kde_email_profile_name
+ kde_email_profile_name=`kreadconfig --file emaildefaults --group Defaults --key Profile`
+ client=`kreadconfig --file emaildefaults --group PROFILE_"$kde_email_profile_name" --key EmailClient | cut -d ' ' -f 1`
echo $client | grep thunderbird > /dev/null 2>&1
if [ $? -eq 0 ] ; then
run_thunderbird "$client" "$1"
@@ -192,7 +195,7 @@
c = substr ($0, i, 1)
if ( ord [c] > 127 ) {
e = e "%" sprintf("%02X", ord [c])
- } else if ( c ~ /[@a-zA-Z0-9.-\\/]/ ) {
+ } else if ( c ~ /[@a-zA-Z0-9.-\\\/]/ ) {
e = e c
} else {
e = e "%" sprintf("%02X", ord [c])
@@ -361,7 +364,7 @@
open_xfce "${mailto}"
;;
- generic)
+ generic|lxde)
open_generic "${mailto}"
;;
diff --git a/scripts/xdg-file-dialog.in b/scripts/xdg-file-dialog.in
index 135cc8a..2a589d1 100644
--- a/scripts/xdg-file-dialog.in
+++ b/scripts/xdg-file-dialog.in
@@ -7,6 +7,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>
#
# LICENSE:
@@ -310,7 +312,7 @@
open_kde "$filename"
;;
- gnome|xfce)
+ gnome|xfce|lxde)
open_zenity "$filename"
;;
@@ -324,7 +326,7 @@
open_multi_kde "$filename"
;;
- gnome|xfce)
+ gnome|xfce|lxde)
open_multi_zenity "$filename"
;;
@@ -338,7 +340,7 @@
save_kde "$filename"
;;
- gnome|xfce)
+ gnome|xfce|lxde)
save_zenity "$filename"
;;
@@ -352,7 +354,7 @@
directory_kde "$filename"
;;
- gnome|xfce)
+ gnome|xfce|lxde)
directory_zenity "$filename"
;;
diff --git a/scripts/xdg-icon-resource b/scripts/xdg-icon-resource
index 563c0d3..8d6c9ac 100755
--- a/scripts/xdg-icon-resource
+++ b/scripts/xdg-icon-resource
@@ -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>
#
diff --git a/scripts/xdg-icon-resource.in b/scripts/xdg-icon-resource.in
index 56daebf..ca81a8b 100644
--- a/scripts/xdg-icon-resource.in
+++ b/scripts/xdg-icon-resource.in
@@ -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>
#
diff --git a/scripts/xdg-mime b/scripts/xdg-mime
index 9dbea60..d8ef66e 100755
--- a/scripts/xdg-mime
+++ b/scripts/xdg-mime
@@ -7,6 +7,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>
#
@@ -83,7 +85,7 @@
application is the desktop file id of the application and has the form
vendor-name.desktop application must already be installed in the desktop
- menu before it can be made the default handler. The aplication's desktop
+ menu before it can be made the default handler. The application's desktop
file must list support for all the MIME types that it wishes to be the
default handler for.
diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
index bfe6c5b..bd65170 100644
--- a/scripts/xdg-mime.in
+++ b/scripts/xdg-mime.in
@@ -7,6 +7,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>
#
diff --git a/scripts/xdg-open b/scripts/xdg-open
index 05b879c..d14c5ea 100755
--- a/scripts/xdg-open
+++ b/scripts/xdg-open
@@ -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>
#
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index f0304ec..457de3e 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -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"
;;
diff --git a/scripts/xdg-su.in b/scripts/xdg-su.in
index 0b83109..0b067ee 100644
--- a/scripts/xdg-su.in
+++ b/scripts/xdg-su.in
@@ -8,6 +8,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, Jeremy White <jwhite@codeweavers.com>
# Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
#
@@ -144,7 +146,7 @@
su_kde
;;
- gnome)
+ gnome|lxde)
su_gnome
;;
diff --git a/scripts/xdg-terminal.in b/scripts/xdg-terminal.in
index 621f55b..7a03e1e 100644
--- a/scripts/xdg-terminal.in
+++ b/scripts/xdg-terminal.in
@@ -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>
#
# LICENSE:
@@ -115,6 +117,19 @@
fi
}
+terminal_lxde()
+{
+ if which lxterminal &>/dev/null; then
+ if [ x"$1" == x"" ]; then
+ lxterminal
+ else
+ lxterminal -e "$1"
+ fi
+ else
+ terminal_generic "$1"
+ fi
+}
+
#[ x"$1" != x"" ] || exit_failure_syntax
command=
@@ -159,6 +174,10 @@
terminal_xfce "$command"
;;
+ lxde)
+ terminal_lxde "$command"
+ ;;
+
generic)
terminal_generic "$command"
;;
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index 6e6c205..60d70c3 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -197,6 +197,7 @@
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;
fi
}
@@ -207,10 +208,10 @@
kfmclient_fix_exit_code()
{
- version=`kde${KDE_SESSION_VERSION}-config --version 2>/dev/null | grep KDE`
- major=`echo $version | sed 's/KDE: \([0-9]\).*/\1/'`
- minor=`echo $version | sed 's/KDE: [0-9]*\.\([0-9]\).*/\1/'`
- release=`echo $version | sed 's/KDE: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
+ version=`kde${KDE_SESSION_VERSION}-config --version 2>/dev/null | grep '^KDE'`
+ major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
+ minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
+ release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
test "$major" -gt 3 && return $1
test "$minor" -gt 5 && return $1
test "$release" -gt 4 && return $1