~ubuntu-branches/ubuntu/oneiric/thunderbird/oneiric

« back to all changes in this revision

Viewing changes to debian/globalmenu/chrome/content/firefoxOverlay.xul

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2011-04-19 17:18:34 UTC
  • Revision ID: james.westby@ubuntu.com-20110419171834-ap445uayze884vb0
Tags: 3.1.9+nobinonly-0ubuntu4
* Fix LP: #766151 - popuphiding and popuphidden events aren't dispatched
  when a menu is closed
  - update globalmenu-extension to 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
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" />
41
41
 
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 :( -->
53
 
 
54
42
  <menupopup id="goPopup"
55
 
    onpopupshowing="if (!this.parentNode._placesView) {
56
 
                      this._startMarker = -1;
57
 
                      this._endMarker = -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);"/>
61
45
 
62
46
  <menupopup id="bookmarksMenuPopup"
63
47
    onpopupshowing="PlacesCommandHook.updateBookmarkAllTabsCommand();
64
 
                    if (!this.parentNode._placesView) {
65
 
                      this._startMarker = -1;
66
 
                      this._endMarker = -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');"/>
70
50
</overlay>