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

Side by Side Diff: scripts/xdg-desktop-icon

Issue 6735024: Linux: update xdg-utils again, and check in the built versions of the scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xdg-utils/
Patch Set: Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « README.chromium ('k') | scripts/xdg-desktop-menu » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 #--------------------------------------------- 2 #---------------------------------------------
3 # xdg-desktop-icon 3 # xdg-desktop-icon
4 # 4 #
5 # Utility script to install desktop items on a Linux desktop. 5 # Utility script to install desktop items on a Linux desktop.
6 # 6 #
7 # Refer to the usage() function below for usage. 7 # Refer to the usage() function below for usage.
8 # 8 #
9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> 9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> 10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 #-------------------------------------- 401 #--------------------------------------
402 # Checks for known desktop environments 402 # Checks for known desktop environments
403 # set variable DE to the desktop environments name, lowercase 403 # set variable DE to the desktop environments name, lowercase
404 404
405 detectDE() 405 detectDE()
406 { 406 {
407 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde; 407 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
408 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; 408 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
409 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul l 2>&1` ; then DE=gnome; 409 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul l 2>&1` ; then DE=gnome;
410 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul l 2>&1; then DE=xfce; 410 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul l 2>&1; then DE=xfce;
411 elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde; 411 fi
412 else DE="" 412
413 if [ x"$DE" = x"" ]; then
414 # fallback to checking $DESKTOP_SESSION
415 case "$DESKTOP_SESSION" in
416 LXDE)
417 DE=lxde;
418 ;;
419 xfce|xfce4)
420 DE=xfce;
421 ;;
422 esac
423 fi
424
425 if [ x"$DE" = x"" ]; then
426 # fallback to uname output for other platforms
427 case "$(uname 2>/dev/null)" in
428 Darwin)
429 DE=darwin;
430 ;;
431 esac
432 fi
433
434 if [ x"$DE" = x"gnome" ]; then
435 # gnome-default-applications-properties is only available in GNOME 2.x
436 # but not in GNOME 3.x
437 which gnome-default-applications-properties 2> /dev/null || DE="gnome3"
413 fi 438 fi
414 } 439 }
415 440
416 #---------------------------------------------------------------------------- 441 #----------------------------------------------------------------------------
417 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 442 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
418 # It also always returns 1 in KDE 3.4 and earlier 443 # It also always returns 1 in KDE 3.4 and earlier
419 # Simply return 0 in such case 444 # Simply return 0 in such case
420 445
421 kfmclient_fix_exit_code() 446 kfmclient_fix_exit_code()
422 { 447 {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 rm -f "$x/$basefile" 578 rm -f "$x/$basefile"
554 fi 579 fi
555 done 580 done
556 581
557 ;; 582 ;;
558 esac 583 esac
559 584
560 exit_success 585 exit_success
561 586
562 587
OLDNEW
« no previous file with comments | « README.chromium ('k') | scripts/xdg-desktop-menu » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698