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

Unified Diff: third_party/xdg-utils/scripts/xdg-settings.in

Issue 160376: Check for localized settings by hand in xdg-settings if kreadconfig fails.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: '' Created 11 years, 5 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 | « third_party/xdg-utils/scripts/xdg-settings ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/xdg-utils/scripts/xdg-settings.in
===================================================================
--- third_party/xdg-utils/scripts/xdg-settings.in (revision 22072)
+++ third_party/xdg-utils/scripts/xdg-settings.in (working copy)
@@ -145,9 +145,23 @@
fi
}
+read_kde_browser()
+{
+ browser="`kreadconfig --file kdeglobals --group General --key BrowserApplication`"
+ if [ "$browser" ]; then
+ echo "$browser"
+ 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="$HOME/.kde/share/config/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()
{
- browser="`kreadconfig --file kdeglobals --group General --key BrowserApplication`"
+ browser="`read_kde_browser`"
if [ x"$browser" = x ]; then
# No explicit default browser; KDE will use the MIME type text/html
get_browser_mime
@@ -158,7 +172,7 @@
check_browser_kde()
{
- browser="`kreadconfig --file kdeglobals --group General --key BrowserApplication`"
+ browser="`read_kde_browser`"
browser="`resolve_kde_browser`"
# Because KDE will use the handler for MIME type text/html if this value
# is empty, we allow either the empty string or a match to $1 here
« no previous file with comments | « third_party/xdg-utils/scripts/xdg-settings ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698