aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-08-07 02:44:52 +0800
committerChristian Persch <chpe@src.gnome.org>2004-08-07 02:44:52 +0800
commit0bd4166c066d6f50133e41c71151b1bb31f917e4 (patch)
treebbed6e99351de98ff4114d205502f66f11ebd42f
parentace0653216f5e6e4d8f4f972cc96a0f27f147cf8 (diff)
downloadgsoc2013-epiphany-0bd4166c066d6f50133e41c71151b1bb31f917e4.tar
gsoc2013-epiphany-0bd4166c066d6f50133e41c71151b1bb31f917e4.tar.gz
gsoc2013-epiphany-0bd4166c066d6f50133e41c71151b1bb31f917e4.tar.bz2
gsoc2013-epiphany-0bd4166c066d6f50133e41c71151b1bb31f917e4.tar.lz
gsoc2013-epiphany-0bd4166c066d6f50133e41c71151b1bb31f917e4.tar.xz
gsoc2013-epiphany-0bd4166c066d6f50133e41c71151b1bb31f917e4.tar.zst
gsoc2013-epiphany-0bd4166c066d6f50133e41c71151b1bb31f917e4.zip
Make keyword search URL localisable. Fixes bug #144909.
2004-08-06 Christian Persch <chpe@cvs.gnome.org> * data/default-prefs.js: * embed/mozilla/mozilla-embed-single.cpp: Make keyword search URL localisable. Fixes bug #144909.
-rw-r--r--ChangeLog7
-rw-r--r--data/default-prefs.js1
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp20
3 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 138d23472..cd7a00fd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2004-08-06 Christian Persch <chpe@cvs.gnome.org>
+ * data/default-prefs.js:
+ * embed/mozilla/mozilla-embed-single.cpp:
+
+ Make keyword search URL localisable. Fixes bug #144909.
+
+2004-08-06 Christian Persch <chpe@cvs.gnome.org>
+
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
* embed/mozilla/mozilla-embed.cpp:
diff --git a/data/default-prefs.js b/data/default-prefs.js
index f16f6fbbb..2517d6c88 100644
--- a/data/default-prefs.js
+++ b/data/default-prefs.js
@@ -29,7 +29,6 @@ pref("helpers.global_mime_types_file", "");
pref("helpers.private_mime_types_file", "");
// use google for keywords
-pref("keyword.URL", "http://www.google.com/search?ie=UTF-8&oe=UTF-8&q=");
pref("keyword.enabled", true);
// disable usless security warnings
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 780f2ef37..8da7ce61e 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -204,6 +204,22 @@ mozilla_set_default_prefs (MozillaEmbedSingle *mes)
return FALSE;
}
+ nsCOMPtr<nsIPrefBranch> pref;
+ prefService->GetBranch ("", getter_AddRefs(pref));
+ NS_ENSURE_TRUE (pref, FALSE);
+
+ /* We do this before reading the user pref file so that the user
+ * still can overwrite this pref.
+ * We don't use the default-prefs.js file since that cannot be
+ * localised (see bug #144909).
+ */
+ /* translators: this is the URL that searches from the location
+ * entry get directed to. The search terms will be _appended_ to it,
+ * in url-escaped UTF-8; that means that if you're choosing google,
+ * the 'q=' part needs to come last.
+ */
+ pref->SetCharPref ("keyword.URL", _("http://www.google.com/search?ie=UTF-8&oe=UTF-8&q="));
+
/* Load the default user preferences as well. This also makes the
prefs to be saved in the user's prefs.js file, instead of messing up
our global defaults file. */
@@ -213,10 +229,6 @@ mozilla_set_default_prefs (MozillaEmbedSingle *mes)
g_warning ("failed to read user preferences, error: %x", rv);
}
- nsCOMPtr<nsIPrefBranch> pref;
- prefService->GetBranch ("", getter_AddRefs(pref));
- NS_ENSURE_TRUE (pref, FALSE);
-
/* FIXME We need to do this because mozilla doesnt set product
sub for embedding apps */
pref->SetCharPref ("general.useragent.vendor", "Epiphany");