mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 571752 - Add History to the Firefox button menu. r=dao
This commit is contained in:
parent
08afd68fed
commit
285ced8a7b
@ -455,15 +455,15 @@
|
||||
</menu>
|
||||
|
||||
<menu id="history-menu"
|
||||
oncommand="this._placesView._onCommand(event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
label="&historyMenu.label;"
|
||||
accesskey="&historyMenu.accesskey;">
|
||||
<menupopup id="goPopup"
|
||||
#ifndef XP_MACOSX
|
||||
placespopup="true"
|
||||
#endif
|
||||
onpopupshowing="if (!document.getElementById('history-menu')._placesView)
|
||||
oncommand="this.parentNode._placesView._onCommand(event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
onpopupshowing="if (!this.parentNode._placesView)
|
||||
new HistoryMenu(event);"
|
||||
tooltip="bhTooltip"
|
||||
popupsinherittooltip="true">
|
||||
@ -497,7 +497,9 @@
|
||||
#endif
|
||||
command="Browser:ShowAllHistory"/>
|
||||
<menuseparator id="startHistorySeparator"/>
|
||||
<menuseparator id="endHistorySeparator" builder="end"/>
|
||||
<menuseparator id="endHistorySeparator"
|
||||
class="hide-if-empty-places-result"
|
||||
builder="end"/>
|
||||
<menu id="historyUndoMenu"
|
||||
label="&historyUndoMenu.label;"
|
||||
disabled="true">
|
||||
@ -533,7 +535,7 @@
|
||||
openInTabs="children"
|
||||
oncommand="BookmarksEventHandler.onCommand(event);"
|
||||
onclick="BookmarksEventHandler.onClick(event);"
|
||||
onpopupshowing="if (!document.getElementById('bookmarksMenu')._placesView)
|
||||
onpopupshowing="if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
|
||||
tooltip="bhTooltip" popupsinherittooltip="true">
|
||||
<menuitem id="menu_bookmarkThisPage"
|
||||
|
@ -749,11 +749,6 @@ HistoryMenu.prototype = {
|
||||
if (aEvent.target != aEvent.currentTarget)
|
||||
return;
|
||||
|
||||
let resultNode = this.result.root;
|
||||
resultNode.containerOpen = true;
|
||||
document.getElementById("endHistorySeparator").hidden =
|
||||
resultNode.childCount == 0;
|
||||
|
||||
this.toggleRecentlyClosedTabs();
|
||||
this.toggleRecentlyClosedWindows();
|
||||
},
|
||||
|
@ -192,6 +192,10 @@ toolbarbutton.bookmark-item {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
menupopup[emptyplacesresult="true"] > .hide-if-empty-places-result {
|
||||
display: none;
|
||||
}
|
||||
|
||||
menuitem.spell-suggestion {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
@ -421,6 +421,29 @@
|
||||
key="key_find"
|
||||
command="cmd_find"/>
|
||||
<menuseparator/>
|
||||
<menu id="appmenu_history"
|
||||
label="&historyMenu.label;">
|
||||
<menupopup id="appmenu_history_popup"
|
||||
placespopup="true"
|
||||
oncommand="this.parentNode._placesView._onCommand(event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
onpopupshowing="if (!this.parentNode._placesView)
|
||||
new HistoryMenu(event);"
|
||||
tooltip="bhTooltip"
|
||||
popupsinherittooltip="true">
|
||||
<menuitem id="appmenu_sanitizeHistory"
|
||||
label="&clearRecentHistory.label;"
|
||||
key="key_sanitize"
|
||||
command="Tools:Sanitize"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu_showAllHistory"
|
||||
label="&showAllHistoryCmd2.label;"
|
||||
key="showAllHistoryKb"
|
||||
command="Browser:ShowAllHistory"/>
|
||||
<menuseparator class="hide-if-empty-places-result"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menu id="appmenu_customize"
|
||||
label="&appMenuCustomize.label;">
|
||||
<menupopup id="appmenu_customizeMenu"
|
||||
|
@ -256,6 +256,7 @@ PlacesViewBase.prototype = {
|
||||
|
||||
let cc = resultNode.childCount;
|
||||
if (cc > 0) {
|
||||
aPopup.removeAttribute("emptyplacesresult");
|
||||
if (aPopup._emptyMenuItem)
|
||||
aPopup._emptyMenuItem.hidden = true;
|
||||
|
||||
@ -265,6 +266,7 @@ PlacesViewBase.prototype = {
|
||||
}
|
||||
}
|
||||
else {
|
||||
aPopup.setAttribute("emptyplacesresult", "true");
|
||||
// This menu is empty. If there is no static content, add
|
||||
// an element to show it is empty.
|
||||
if (aPopup._startMarker == -1 && aPopup._endMarker == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user