r=pav
added check for search engine
This commit is contained in:
matt%netscape.com 2000-09-14 04:51:25 +00:00
Родитель 0b9eda0dd2
Коммит e52c1090c4
2 изменённых файлов: 22 добавлений и 5 удалений

Просмотреть файл

@ -20,8 +20,10 @@
* Contributor(s): Robert John Churchill (rjc@netscape.com)
*/
var pref = null;
try
// var pref = null;
// document.getElementById("engineList").value = 0;
/* try
{
pref = Components.classes["@mozilla.org/preferences;1"];
if (pref) pref = pref.getService();
@ -33,6 +35,16 @@
pref = null;
}
*/
function checkEngine()
{
var engineList = document.getElementById("engineList");
var engineValue = engineList.value;
if (!engineValue)
engineList.selectedIndex = 6;
}
function InitSingleEngineList()
@ -49,7 +61,9 @@ function InitSingleEngineList()
}
catch(ex)
{
dump("\ncatch");
defaultEngineURI = null;
document.getElementById("engineList").selectedIndex = 6;
}
if ((!defaultEngineURI) || (defaultEngineURI == "")) return;
@ -68,6 +82,8 @@ function InitSingleEngineList()
if (uri != defaultEngineURI) continue;
engineList.selectedIndex = x;
dump("\n" + x);
engineList.selectedItem = selectedItem;
break;
}
}

Просмотреть файл

@ -27,14 +27,15 @@
<window debug="false" xmlns:html="http://www.w3.org/1999/xhtml"
class="color-dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://communicator/content/pref/pref-search.xul');" title="&title.label;"
orient="vertical">
onload="parent.initPanel('chrome://communicator/content/pref/pref-search.xul');checkEngine()" title="&title.label;"
orient="vertical">
<script language="JavaScript">
<![CDATA[
_elementIDs = ["engineList","openSidebarPanel"];
]]>
</script>
</script>
<script language="JavaScript" src="chrome://communicator/content/pref/pref-search.js"></script>
<box class="box-smallheader" title="&lHeader;"/>