Bug 414569 - "AMO Integration: Right-click on extension/theme results in an empty context menu" [p=dtownsend@mozilla.com (Dave Townsend [Mossop]) r=gavin ui-r+a1.9=beltzner]

This commit is contained in:
reed@reedloden.com 2008-02-26 20:12:53 -08:00
Родитель 007861cb20
Коммит 9bc1786a68
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -1627,6 +1627,7 @@ var gUpdateContextMenus = ["menuitem_homepage", "menuitem_about", "menuseparator
// For Firefox don't display context menuitems that can open a browser window.
var gUpdateContextMenusNoBrowser = ["menuitem_installUpdate", "menuitem_includeUpdate"];
var gInstallContextMenus = ["menuitem_homepage", "menuitem_about"];
var gSearchContextMenus = ["menuitem_learnMore", "menuitem_installSearchResult"];
function buildContextMenu(aEvent)
{
@ -1639,11 +1640,14 @@ function buildContextMenu(aEvent)
popup.removeChild(popup.firstChild);
switch (gView) {
case "search":
var menus = gSearchContextMenus;
break;
case "extensions":
case "themes":
case "locales":
case "plugins":
var menus = gAddonContextMenus;
menus = gAddonContextMenus;
break;
case "updates":
menus = gUpdateContextMenus;

Просмотреть файл

@ -151,6 +151,10 @@
<menuitem id="menuitem_includeUpdate" command="cmd_includeUpdate"
label="&cmd.includeUpdate.label;" accesskey="&cmd.includeUpdate.accesskey;"
type="checkbox"/>
<menuitem id="menuitem_learnMore" command="cmd_homepage"
label="&searchResultHomepage.value;"/>
<menuitem id="menuitem_installSearchResult" command="cmd_installSearchResult"
label="&cmd.installSearchResult.label;"/>
</vbox>
<popup id="addonContextMenu" onpopupshowing="return buildContextMenu(event);"/>