add:  var useRadioMenuitems = (menuPopup.parentNode.localName == "menu"); if (menuPopup.childNodes.length == kFixedFontFaceMenuItems) { if (gLocalFonts.length == 0) { menuPopup.childNodes[kFixedFontFaceMenuItems - 1].hidden = true; } for (var i = 0; i < gLocalFonts.length; ++i) { if (gLocalFonts[i] != "") { var itemNode = document.createElementNS(XUL_NS, "menuitem"); itemNode.setAttribute("label", gLocalFonts[i]); itemNode.setAttribute("value", gLocalFonts[i]); if (useRadioMenuitems) { itemNode.setAttribute("type", "radio"); itemNode.setAttribute("name", "2"); } itemNode.setAttribute("observes", "cmd_renderedHTMLEnabler"); menuPopup.appendChild(itemNode); } } } 
context: function initLocalFontFaceMenu(menuPopup){  if (!gLocalFonts)  {    // Build list of all local fonts once per editor    try     {      var enumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]                                 .getService(Components.interfaces.nsIFontEnumerator);      var localFontCount = { value: 0 }      gLocalFonts = enumerator.EnumerateAllFonts(localFontCount);      for (var i = 0; i < gLocalFonts.length; ++i)      {        if (gLocalFonts[i] != "")        {          var itemNode = document.createElementNS(XUL_NS, "menuitem");          itemNode.setAttribute("label", gLocalFonts[i]);          itemNode.setAttribute("value", gLocalFonts[i]);          itemNode.setAttribute("type", "radio");          itemNode.setAttribute("name", "2");          itemNode.setAttribute("observes", "cmd_renderedHTMLEnabler");          menuPopup.appendChild(itemNode);        }      }    }    catch(e) { }  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/13a42d51d1951b151f22aafab2b214ada74309ac/editor.js/buggy/editor/ui/composer/content/editor.js