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

Side by Side Diff: third_party/xdg-utils/scripts/xdg-utils-common.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, 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 | « third_party/xdg-utils/scripts/xdg-terminal.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 #---------------------------------------------------------------------------- 2 #----------------------------------------------------------------------------
3 # Common utility functions included in all XDG wrapper scripts 3 # Common utility functions included in all XDG wrapper scripts
4 #---------------------------------------------------------------------------- 4 #----------------------------------------------------------------------------
5 5
6 DEBUG() 6 DEBUG()
7 { 7 {
8 [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; 8 [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
9 [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; 9 [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
10 shift 10 shift
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 #-------------------------------------- 190 #--------------------------------------
191 # Checks for known desktop environments 191 # Checks for known desktop environments
192 # set variable DE to the desktop environments name, lowercase 192 # set variable DE to the desktop environments name, lowercase
193 193
194 detectDE() 194 detectDE()
195 { 195 {
196 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde; 196 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
197 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; 197 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
198 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; 198 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;
199 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul l 2>&1; then DE=xfce; 199 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul l 2>&1; then DE=xfce;
200 elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
200 fi 201 fi
201 } 202 }
202 203
203 #---------------------------------------------------------------------------- 204 #----------------------------------------------------------------------------
204 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 205 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
205 # It also always returns 1 in KDE 3.4 and earlier 206 # It also always returns 1 in KDE 3.4 and earlier
206 # Simply return 0 in such case 207 # Simply return 0 in such case
207 208
208 kfmclient_fix_exit_code() 209 kfmclient_fix_exit_code()
209 { 210 {
210 version=`kde${KDE_SESSION_VERSION}-config --version 2>/dev/null | grep KDE` 211 version=`kde${KDE_SESSION_VERSION}-config --version 2>/dev/null | grep '^KDE '`
211 major=`echo $version | sed 's/KDE: \([0-9]\).*/\1/'` 212 major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
212 minor=`echo $version | sed 's/KDE: [0-9]*\.\([0-9]\).*/\1/'` 213 minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
213 release=`echo $version | sed 's/KDE: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` 214 release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
214 test "$major" -gt 3 && return $1 215 test "$major" -gt 3 && return $1
215 test "$minor" -gt 5 && return $1 216 test "$minor" -gt 5 && return $1
216 test "$release" -gt 4 && return $1 217 test "$release" -gt 4 && return $1
217 return 0 218 return 0
218 } 219 }
OLDNEW
« no previous file with comments | « third_party/xdg-utils/scripts/xdg-terminal.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698