Bug 408938 - Include bookmarks toolbar folder in bookmarks menu. r=dietrich.

This commit is contained in:
mozilla.mano@sent.com 2008-03-10 20:18:44 -07:00
parent 3fe547d673
commit d4893bc197
2 changed files with 20 additions and 7 deletions

View File

@ -387,7 +387,7 @@
ondragdrop="nsDragAndDrop.drop(event, BookmarksMenuDropHandler);"
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDropHandler);">
<menupopup id="bookmarksMenuPopup"
type="places" asyncinit="true"
type="places"
place="place:folder=2&amp;expandQueries=1"
context="placesContext"
openInTabs="children"
@ -411,12 +411,23 @@
</menu>
<menuitem label="&addCurPagesCmd.label;"
command="Browser:BookmarkAllTabs" key="bookmarkAllTabsKb"/>
<menuseparator id="organizeBookmarksSeparator"/>
<menuitem label="&showAllBookmarksCmd2.label;"
command="Browser:ShowAllBookmarks" key="manBookmarkKb"/>
<menu id="bookmarksToolbarFolderMenu"
class="menu-iconic bookmark-item"
container="true">
<menupopup id="bookmarksToolbarFolderPopup"
type="places"
context="placesContext"
oncommand="BookmarksEventHandler.onCommand(event);"
onclick="BookmarksEventHandler.onClick(event);"
onpopupshowing="BookmarksEventHandler.onPopupShowing(event);"/>
</menu>
<menuseparator builder="start"/>
</menupopup>
</menu>
<menu id="tools-menu" label="&toolsMenu.label;" accesskey="&toolsMenu.accesskey;">
<menupopup id="menu_ToolsPopup">
<menuitem label="&search.label;" accesskey="&search.accesskey;"

View File

@ -260,15 +260,17 @@ function BookmarkThisTab()
}
/**
* Initialize the bookmarks toolbar
* Initialize the bookmarks toolbar and the menuitem for it.
*/
function initBookmarksToolbar() {
var place = PlacesUtils.getQueryStringForFolder(PlacesUtils.bookmarks.toolbarFolder);
var bt = document.getElementById("bookmarksBarContent");
if (!bt)
return;
if (bt)
bt.place = place;
bt.place =
PlacesUtils.getQueryStringForFolder(PlacesUtils.bookmarks.toolbarFolder);
document.getElementById("bookmarksToolbarFolderPopup").place = place;
document.getElementById("bookmarksToolbarFolderMenu").label =
PlacesUtils.bookmarks.getItemTitle(PlacesUtils.bookmarks.toolbarFolder);
}
const gSessionHistoryObserver = {