mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-29 21:25:35 +00:00
Remove unnecessary method AppendLabelAndValueToMenuList, b=144956, fix by neil@parkwaycc.co.uk, r=cmanske, sr=hewitt
This commit is contained in:
parent
d010d0d84c
commit
f8b4da3f44
@ -283,35 +283,6 @@ function AppendStringToMenulist(menulist, string)
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function AppendLabelAndValueToMenulist(menulist, labelStr, valueStr)
|
|
||||||
{
|
|
||||||
if (menulist)
|
|
||||||
{
|
|
||||||
var menupopup = menulist.firstChild;
|
|
||||||
// May not have any popup yet -- so create one
|
|
||||||
if (!menupopup)
|
|
||||||
{
|
|
||||||
menupopup = document.createElementNS(XUL_NS, "menupopup");
|
|
||||||
if (menupopup)
|
|
||||||
menulist.appendChild(menupopup);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dump("Failed to create menupoup\n");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var menuItem = document.createElementNS(XUL_NS, "menuitem");
|
|
||||||
if (menuItem)
|
|
||||||
{
|
|
||||||
menuItem.setAttribute("label", labelStr);
|
|
||||||
menuItem.setAttribute("value", valueStr);
|
|
||||||
menupopup.appendChild(menuItem);
|
|
||||||
return menuItem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function ClearMenulist(menulist)
|
function ClearMenulist(menulist)
|
||||||
{
|
{
|
||||||
// Always use "AppendStringToMenulist" so we know there's
|
// Always use "AppendStringToMenulist" so we know there's
|
||||||
|
Loading…
Reference in New Issue
Block a user