From 83a3c79867bd0beabb3eac9dae855bd07c40ac48 Mon Sep 17 00:00:00 2001 From: "matt%netscape.com" Date: Wed, 17 May 2006 02:28:08 +0000 Subject: [PATCH] fix for bug 44036 r=pav added check for search engine --- suite/common/pref/pref-search.js | 20 ++++++++++++++++++-- suite/common/pref/pref-search.xul | 7 ++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/suite/common/pref/pref-search.js b/suite/common/pref/pref-search.js index b8bc060ed908..ed899f3ddc7c 100755 --- a/suite/common/pref/pref-search.js +++ b/suite/common/pref/pref-search.js @@ -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; } } diff --git a/suite/common/pref/pref-search.xul b/suite/common/pref/pref-search.xul index 72ce322bb429..35bf787d1e4f 100755 --- a/suite/common/pref/pref-search.xul +++ b/suite/common/pref/pref-search.xul @@ -27,14 +27,15 @@ + onload="parent.initPanel('chrome://communicator/content/pref/pref-search.xul');checkEngine()" title="&title.label;" + orient="vertical"> + +