CCK only - not part of build - make locking of search engine prefs work correctly

git-svn-id: svn://10.0.0.236/trunk@245782 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com 2008-02-15 15:33:47 +00:00
parent 18904ddc4a
commit 366c1eb0f8
2 changed files with 12 additions and 4 deletions

View File

@ -358,7 +358,8 @@ Array.prototype.exists = function (x) {
}
var prefsLockOnly = ["browser.startup.homepage", "browser.throbber.url",
"startup.homepage_override_url", "startup.homepage_welcome_url",
"startup.homepage_override_url", "startup.homepage_welcome_url",
"browser.search.defaultenginename", "browser.search.order.1",
"network.proxy.type", "network.proxy.http", "network.proxy.http_port",
"network.proxy.share_proxy_settings", "network.proxy.ssl",
"network.proxy.ssl_port", "network.proxy.ftp", "network.proxy.ftp_port",
@ -1814,8 +1815,12 @@ function CCKWriteDefaultJS(destdir)
var bundle = document.getElementById("bundle_cckwizard");
if (document.getElementById("defaultSearchEngine").selectedItem.label != bundle.getString("useBrowserDefault")) {
fos.write(searchengine1, searchengine1.length);
fos.write(searchengine2, searchengine2.length);
if (!prefIsLocked("browser.search.defaultenginename")) {
fos.write(searchengine1, searchengine1.length);
}
if (!prefIsLocked("browser.search.order.1")) {
fos.write(searchengine2, searchengine2.length);
}
}

View File

@ -256,7 +256,10 @@ CCKService.prototype={
prefName = "";
}
if (prefName && prefName.length) {
if ((prefName == "browser.startup.homepage") || (prefName == "browser.throbber.url")) {
if ((prefName == "browser.startup.homepage") ||
(prefName == "browser.search.defaultenginename") ||
(prefName == "browser.search.order.1") ||
(prefName == "browser.throbber.url")) {
var url = bundle.GetStringFromName(prefName);
if (url) {
defprefbranch.setCharPref(prefName, url);