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

Unified Diff: third_party/xdg-utils/scripts/xdg-icon-resource

Issue 3273010: Update our copy of xdg-utils to 2010-08-30, and include a patched xdg-mime. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: Created 10 years, 4 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
Index: third_party/xdg-utils/scripts/xdg-icon-resource
===================================================================
--- third_party/xdg-utils/scripts/xdg-icon-resource (revision 57942)
+++ third_party/xdg-utils/scripts/xdg-icon-resource (working copy)
@@ -293,7 +293,7 @@
}
#------------------------------------------------------------
-# Exit script on insufficient permission to read a specified file
+# Exit script on insufficient permission to write a specified file
exit_failure_file_permission_write()
{
@@ -370,7 +370,7 @@
;;
--version)
- echo "xdg-icon-resource 1.0.1"
+ echo "xdg-icon-resource 1.0.2"
exit_success
;;
esac
@@ -396,7 +396,8 @@
{
if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
- elif xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
+ 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;
fi
}
@@ -423,8 +424,8 @@
find_gtk_update_icon_cache()
{
[ -n "$GTK_UPDATE_ICON_CACHE" ] && return;
-
- GTK_UPDATE_ICON_CACHE="-"
+
+ GTK_UPDATE_ICON_CACHE="-"
for x in `echo "$PATH:/opt/gnome/bin" | sed 's/:/ /g'`; do
DEBUG 3 "Checking $x for gtk-update-icon-cache"
if [ -x "$x/gtk-update-icon-cache" ] ; then
@@ -442,7 +443,7 @@
# The availability of gtk-update-icon-cache is used as indication
# of whether the system is using GTK 2.6 or later
find_gtk_update_icon_cache
- [ "$GTK_UPDATE_ICON_CACHE" != "-" ] && return 1;
+ [ "$GTK_UPDATE_ICON_CACHE" != "-" ] && return 1;
return 0;
}
@@ -455,7 +456,7 @@
# Don't create a cache if there wan't one already
if [ -f "$1/icon-theme.cache" ] ; then
find_gtk_update_icon_cache
- if [ "$GTK_UPDATE_ICON_CACHE" != "-" ] ; then
+ if [ "$GTK_UPDATE_ICON_CACHE" != "-" ] ; then
DEBUG 1 "Running $GTK_UPDATE_ICON_CACHE -f -t \"$1\""
eval '$GTK_UPDATE_ICON_CACHE -f -t "$1"'$xdg_redirect_output
return
@@ -516,7 +517,7 @@
system)
mode="system"
;;
-
+
*)
exit_failure_syntax "unknown mode '$1'"
;;
@@ -734,9 +735,10 @@
xdg_dir="$xdg_base_dir/$xdg_size_name/$context"
#KDE 3.x doesn't support XDG_DATA_HOME for icons
#Check if xdg_dir prefix is listed by kde-config --path icon
- #If not, install additional symlink to kdedir
+ #If not, install additional symlink to kdedir
if need_kde_icon_path "$xdg_user_prefix" ; then
- kde_user_dir="$HOME/.kde/share/icons/$theme"
+ kde_user_icon_dir=`kde${KDE_SESSION_VERSION}-config --path icon | cut -d ':' -f 1`
+ kde_user_dir="$kde_user_icon_dir/$theme"
kde_dir="$kde_user_dir/$xdg_size_name/$context"
fi
#Gnome 2.8 supports ~/.icons but not XDG_DATA_HOME
@@ -757,7 +759,7 @@
xdg_dir="$xdg_base_dir/$xdg_size_name/$context"
#KDE 3.x doesn't support XDG_DATA_DIRS for icons
#Check if xdg_dir prefix is listed by kde-config --path icon
- #If not, install additional symlink to kdedir
+ #If not, install additional symlink to kdedir
if need_kde_icon_path "$xdg_global_prefix" ; then
kde_global_dir="$kde_global_prefix/$theme"
kde_dir="$kde_global_dir/$xdg_size_name/$context"
@@ -768,7 +770,7 @@
# Start GNOME legacy workaround section
need_gnome_mime=
-[ $context = "mimetypes" ] && need_gnome_mime=true
+[ $context = "mimetypes" ] && need_gnome_mime=true
# End GNOME legacy workaround section
[ -n "$icon_name" ] || icon_name=`basename "$icon_file" | sed 's/\.[a-z][a-z][a-z]$//'`
@@ -814,8 +816,8 @@
rm -f "$icon_dir/$icon_name.xpm" "$icon_dir/$icon_name.png"
rm -f "$icon_dir/$icon_icon_name"
if [ -n "$need_gnome_mime" ] ; then
- rm -f "$icon_dir/gnome-mime-$icon_name.xpm"
- rm -f "$icon_dir/gnome-mime-$icon_name.png"
+ rm -f "$icon_dir/gnome-mime-$icon_name.xpm"
+ rm -f "$icon_dir/gnome-mime-$icon_name.png"
fi
done
if [ -n "$kde_dir" ] ; then
« no previous file with comments | « third_party/xdg-utils/scripts/xdg-file-dialog.in ('k') | third_party/xdg-utils/scripts/xdg-icon-resource.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698