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

Unified Diff: scripts/xdg-settings.in

Issue 3330004: Only run KDE browser fallback when necessary... (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/xdg-utils/
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
« no previous file with comments | « scripts/xdg-settings ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/xdg-settings.in
===================================================================
--- scripts/xdg-settings.in (revision 58024)
+++ scripts/xdg-settings.in (working copy)
@@ -213,16 +213,18 @@
read_kde_browser()
{
browser="`kreadconfig --file kdeglobals --group General --key BrowserApplication`"
- if [ "$browser" ]; then
+ if [ x"$browser" != x ]; then
echo "$browser"
+ else
+ # kreadconfig in KDE 4 may not notice Key[$*]=... localized settings, so
+ # check by hand if it didn't find anything (oddly kwriteconfig works
+ # fine though).
+ kdeglobals_dir=`kde${KDE_SESSION_VERSION}-config --path config | cut -d ':' -f 1`
+ kdeglobals="$kdeglobals_dir/kdeglobals"
+ [ ! -f "$kdeglobals" ] && return
+ # This will only take the first value if there is more than one.
+ grep '^BrowserApplication\[$[^]=]*\]=' "$kdeglobals" | head -n 1 | cut -d= -f 2-
fi
- # kreadconfig in KDE 4 may not notice Key[$*]=... localized settings, so check
- # by hand if it didn't find anything (oddly kwriteconfig works fine though).
- kdeglobals_dir=`kde${KDE_SESSION_VERSION}-config --path config | cut -d ':' -f 1`
- kdeglobals="$kdeglobals_dir/kdeglobals"
- [ ! -f "$kdeglobals" ] && return
- # This will only take the first value if there is more than one.
- grep '^BrowserApplication\[$[^]=]*\]=' "$kdeglobals" | head -n 1 | cut -d= -f 2-
}
get_browser_kde()
« no previous file with comments | « scripts/xdg-settings ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698