зеркало из https://github.com/mozilla/gecko-dev.git
fix for bug 44036
r=pav added check for search engine
This commit is contained in:
Родитель
c8b15fd127
Коммит
83a3c79867
|
@ -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;"/>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче