Hooked up context menus to bookmarks menu bindings.

bug=317834 r=beng sr=bryner
This commit is contained in:
annie.sullivan%gmail.com 2006-01-17 20:34:39 +00:00
Родитель 4ea60d329e
Коммит 61744add9a
3 изменённых файлов: 10 добавлений и 1 удалений

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

@ -394,7 +394,7 @@
#else #else
<menu id="bookmarksMenu" <menu id="bookmarksMenu"
label="&bookmarksMenu.label;" accesskey="&bookmarksMenu.accesskey;"> label="&bookmarksMenu.label;" accesskey="&bookmarksMenu.accesskey;">
<menupopup id="bookmarksMenuPopup" type="places"> <menupopup id="bookmarksMenuPopup" type="places" context="placesContext">
<menuitem label="&addCurPageAsCmd.label;" <menuitem label="&addCurPageAsCmd.label;"
command="Browser:AddBookmarkAs" key="addBookmarkAsKb"/> command="Browser:AddBookmarkAs" key="addBookmarkAsKb"/>
<menuitem label="&manBookmarksCmd.label;" <menuitem label="&manBookmarksCmd.label;"

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

@ -113,6 +113,9 @@
var popup = document.createElementNS(XULNS, "menupopup"); var popup = document.createElementNS(XULNS, "menupopup");
popup.setAttribute("type", "places"); popup.setAttribute("type", "places");
element.appendChild(popup); element.appendChild(popup);
// The context menu is set here instead of in the xbl constructor
// because it doesn't get initialized properly if set in the constructor.
popup.setAttribute("context", "placesContext");
popup.folderId = child.folderId; popup.folderId = child.folderId;
element.className = "menu-iconic bookmark-item"; element.className = "menu-iconic bookmark-item";
} }

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

@ -79,6 +79,9 @@
button.setAttribute("container", "true"); button.setAttribute("container", "true");
var popup = document.createElementNS(XULNS, "menupopup"); var popup = document.createElementNS(XULNS, "menupopup");
popup.setAttribute("type", "places"); popup.setAttribute("type", "places");
// This is set here and not in the XBL constructor for the menu because
// it doesn't get initialized properly in the constructor.
popup.setAttribute("context", "placesContext");
button.appendChild(popup); button.appendChild(popup);
popup.folderId = child.folderId; popup.folderId = child.folderId;
} }
@ -100,6 +103,9 @@
overflowPadder.appendChild(this._chevron); overflowPadder.appendChild(this._chevron);
var popup = document.createElementNS(XULNS, "menupopup"); var popup = document.createElementNS(XULNS, "menupopup");
popup.setAttribute("type", "places"); popup.setAttribute("type", "places");
// This is set here and not in the XBL constructor for the menu because
// it doesn't get initialized properly in the constructor.
popup.setAttribute("context", "placesContext");
popup.folderId = this._result.folderId; popup.folderId = this._result.folderId;
var t = this; var t = this;
popup.popupShowingCallback = function() {t.chevronPopupShowing();}; popup.popupShowingCallback = function() {t.chevronPopupShowing();};