Ongoing prefs work.

This commit is contained in:
blakeross%telocity.com 2002-08-10 02:45:02 +00:00
parent 8a3d64e464
commit aa04b18510
3 changed files with 1 additions and 74 deletions

View File

@ -1,70 +0,0 @@
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Robert John Churchill <rjc@netscape.com>
* Mark Olson <maolson@earthlink.net>
*/
function checkEngine()
{
var engineList = document.getElementById("engineList");
var engineValue = engineList.label;
//nothing is selected
if (!engineValue)
{
try
{
var prefInt = null; //Preferences Interface
var strDefaultSearchEngineName;
prefInt = Components.classes["@mozilla.org/preferences;1"];
if (prefInt)
{
prefInt = prefInt.getService(Components.interfaces.nsIPref);
strDefaultSearchEngineName = prefInt.getLocalizedUnicharPref("browser.search.defaultenginename");
}
var engineListSelection = engineList.getElementsByAttribute( "label", strDefaultSearchEngineName );
var selectedItem = engineListSelection.length ? engineListSelection[0] : null;
if (selectedItem)
{
//select a locale-dependent predefined search engine in absence of a user default
engineList.selectedItem = selectedItem;
}
else
{
//select the first listed search engine
engineList.selectedIndex = 1;
}
}
catch(e)
{
//select the first listed search engine
engineList.selectedIndex = 1;
}
}
}

View File

@ -30,8 +30,6 @@ browser.jar:
content/browser/pref/pref-proxy-manual.xul (content/pref-proxy-manual.xul)
content/browser/pref/pref-scripts.xul (content/pref-scripts.xul)
content/browser/pref/pref-scripts.js (content/pref-scripts.js)
content/browser/pref/pref-search.js (content/pref-search.js)
content/browser/pref/pref-search.xul (content/pref-search.xul)
content/browser/pref/pref-security.xul (content/pref-security.xul)
content/browser/pref/pref-smart_browsing.xul (content/pref-smart_browsing.xul)
content/browser/pref/pref-smart_browsing.js (content/pref-smart_browsing.js)
@ -66,7 +64,6 @@ en-US.jar:
locale/en-US/browser/pref/pref-proxies.dtd (locale/pref-proxies.dtd)
locale/en-US/browser/pref/pref-proxy-manual.dtd (locale/pref-proxy-manual.dtd)
locale/en-US/browser/pref/pref-scripts.dtd (locale/pref-scripts.dtd)
locale/en-US/browser/pref/pref-search.dtd (locale/pref-search.dtd)
locale/en-US/browser/pref/pref-security.dtd (locale/pref-security.dtd)
locale/en-US/browser/pref/pref-smart_browsing.dtd (locale/pref-smart_browsing.dtd)
locale/en-US/browser/pref/pref-smartupdate.dtd (locale/pref-smartupdate.dtd)

View File

@ -3,7 +3,7 @@
<!ENTITY category.label "Category">
<!--LOCALIZATION NOTE : FILE Lists preferences categories that appear on the left of the preferences dialog -->
<!ENTITY fonts.label "Fonts & Colors">
<!ENTITY fonts.label "Fonts &amp; Colors">
<!ENTITY themes.label "Themes">
<!--LOCALIZATION NOTE (navigator.label): DONT_TRANSLATE -->
<!ENTITY navigator.label "Navigator">