Bug 657215 Default search engine does not show as selected in Preferences r=IanN
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Sun, 15 May 2011 22:15:42 +0100
changeset 7779 e8332e7c3d7c4b04d427699760b2924f97ca1cb2
parent 7778 f97bb671aec4e48dc22a3f06ad4e6b38e7698c44
child 7780 18fbc091e23ff0227ead3c3f1bc7c3dcddc10c05
push idunknown
push userunknown
push dateunknown
reviewersIanN
bugs657215
Bug 657215 Default search engine does not show as selected in Preferences r=IanN
suite/common/pref/pref-search.js
suite/common/pref/pref-search.xul
--- a/suite/common/pref/pref-search.js
+++ b/suite/common/pref/pref-search.js
@@ -44,13 +44,11 @@ function Startup() {
   var menulist = document.getElementById("engineList");
   var engines = Services.search.getVisibleEngines();
   for (let i = 0; i < engines.length; i++) {
     let name = engines[i].name;
     let menuitem = menulist.appendItem(name, name);
     menuitem.setAttribute("class", "menuitem-iconic");
     if (engines[i].iconURI)
       menuitem.setAttribute("image", engines[i].iconURI.spec);
-    menulist.menupopup.appendChild(menuitem);
     menuitem.engine = engines[i];
   }
-  menulist.value = Services.search.defaultEngine.name;
 }
--- a/suite/common/pref/pref-search.xul
+++ b/suite/common/pref/pref-search.xul
@@ -44,17 +44,17 @@
 <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <prefpane id="search_pane"
             label="&pref.search.title;"
             script="chrome://communicator/content/pref/pref-search.js">
 
     <preferences id="search_preferences">
       <preference id="browser.search.defaultenginename"
                   name="browser.search.defaultenginename"
-                  type="string"/>
+                  type="wstring"/>
       <preference id="browser.search.openintab"
                   name="browser.search.openintab"
                   type="bool"/>
       <preference id="browser.search.opentabforcontextsearch"
                   name="browser.search.opentabforcontextsearch"
                   type="bool"/>
       <preference id="browser.search.opensidebarsearchpanel"
                   name="browser.search.opensidebarsearchpanel"