39
39
<overlay id="globalmenu-extension-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
40
40
<script type="application/x-javascript" src="chrome://globalmenu/content/firefoxMenu.js" />
42
<!-- We need to override the popupshowing handlers for the bookmarks and history
43
- menu popups, so that we initialize some data that would normally come from
44
- either XBL bindings (which aren't bound because we don't have a frame), or
45
- some #ifdef'd code only applicable on the Mac. Without this, we don't create
46
- the "(Empty)" placeholder for empty bookmark menus. Note that we need
47
- menu._nativeView to be true when the menu DOM nodes are created. However,
48
- these are all created when instantiating a new PlacesMenu, and before we've had
49
- a chance to set _nativeView.
50
- To work around this, we call menu._rebuildPopup, which discards all the newly
51
- created nodes and rebuilds the menu again (correctly). This sucks, as it means
52
- we are building the menu twice, but I can't think of another way :( -->
54
42
<menupopup id="goPopup"
55
onpopupshowing="if (!this.parentNode._placesView) {
56
this._startMarker = -1;
58
var menu = new HistoryMenu(event);
59
menu._nativeView = true;
60
menu._rebuildPopup(this)};"/>
43
onpopupshowing="if (!this.parentNode._placesView)
44
new HistoryMenuUnityImpl(event);"/>
62
46
<menupopup id="bookmarksMenuPopup"
63
47
onpopupshowing="PlacesCommandHook.updateBookmarkAllTabsCommand();
64
if (!this.parentNode._placesView) {
65
this._startMarker = -1;
67
var menu = new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');
68
menu._nativeView = true;
69
menu._rebuildPopup(this)};"/>
48
if (!this.parentNode._placesView)
49
new PlacesMenuUnityImpl(event, 'place:folder=BOOKMARKS_MENU');"/>