Support menubar in Firefox and Thunderbird

Bug #690447 reported by Chris Coulson
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Medium
Neil J. Patel
indicator-appmenu (Ubuntu)
Invalid
Medium
Karl Lattimer
libdbusmenu (Ubuntu)
Fix Released
Medium
Karl Lattimer
unity (Ubuntu)
Fix Released
Medium
Neil J. Patel

Bug Description

Whilst working on the menubar for Firefox and Thunderbird, I've hit a few issues. The main ones are:

1) One of the headers in libdbusmenu is missing a set of G_BEGIN_DECLS/G_END_DECLS braces, breaking the linker which linking C++ objects.

2) There is no way to tell Firefox when menus are opened. This is necessary for a couple of reasons:
 * Firefox and Thunderbird lazy-load a lot of items and also adjust other attributes lazily
 * We need to maintain the state of the menus in the DOM, with the "open" attribute (see https://developer.mozilla.org/en/XUL/menu)

1 is easily fixable.

2 involves several components:
 * Whilst there is an AboutToShow signal in dbusmenu, it isn't plumbed in on the server side (ie, Firefox). I've attached a branch which does this, and emits an about-to-show signal on the DbusmenuMenuitem.
 * The AboutToShow signal isn't emitted for top-level menus for a couple of reasons. indicator-appmenu calls the wrong function in window_menus_entry_activate, and the unity panel service needs to call indicator_object_entry_activate when displaying the menu popups. I've attached branches which fix both of these issues.

In the long term, Firefox also needs to know when menus are closed, so we can correctly maintain state in the DOM. In the short-term, I'll work around this in Firefox with a bit of guess-work (there's a few things I can do to guess that a menu has been closed)

Related branches

Revision history for this message
David Barth (dbarth) wrote :

Hi Chris, thanks for filing this bug.

1) For the dbusmenu fixes, go ahead and propose the branch for merging, and we'll review and land that on trunk quickly.

2) There is a way. The about to show signal finally got wired in GTK at the end of Maverick. It's in trunk if you look into libdbusmenu-gtk/client.c:menu_pressed_cb

Similarly, there is a way for applications to pop up the panel menu, by calling dbusmenu_menuitem_show_to_user. you can look into lp:appmenu-gtk/bridge.c for an example

We'll look at the patches for unity and indicator-appmenu: thanks!

3) I think we could add an extra signal, sent by i-appmenu and transported by dbusmenu to indicate which menu element just closed. The app. would have to check if its the toplevel menu or one of its submenus. Would that make sense in your case?

Changed in unity (Ubuntu):
assignee: nobody → Neil J. Patel (njpatel)
importance: Undecided → Medium
milestone: none → natty-alpha-2
status: New → Triaged
Changed in unity:
assignee: nobody → Neil J. Patel (njpatel)
importance: Undecided → Medium
milestone: none → 3.4
status: New → Triaged
Changed in indicator-appmenu (Ubuntu):
assignee: nobody → Ted Gould (ted)
importance: Undecided → Medium
milestone: none → natty-alpha-2
status: New → Confirmed
Changed in libdbusmenu (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in indicator-appmenu (Ubuntu):
assignee: Ted Gould (ted) → Karl Lattimer (karl-qdh)
David Barth (dbarth)
Changed in libdbusmenu (Ubuntu):
assignee: nobody → Karl Lattimer (karl-qdh)
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks. I didn't realise that AboutToShow was wired in, it didn't seem like it when I looked at it, but I might have misunderstood how it is working.

As for the menu close events - I've just committed http://bazaar.launchpad.net/~chrisccoulson/globalmenu-extension/trunk/revision/19 which works around this for now (by doing a bit of guess work to fake the events), to make the extension behave correctly.

Neil J. Patel (njpatel)
Changed in unity:
status: Triaged → Fix Committed
milestone: 3.4 → 3.2.8
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

I'm just curious as to whether these two branches I've been asked to review are the correct ones.

Chris? If so I'll start digging at them

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Karl - yeah, they're the correct branches

Neil J. Patel (njpatel)
Changed in unity:
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 3.2.8-0ubuntu1

---------------
unity (3.2.8-0ubuntu1) natty; urgency=low

  * New upstream release:
    - unity-panel-service should be autorestarted by unity when crashing
      (lp: #686591)
    - App name in panel menu is truncated (lp: #619477)
    - Removing the appmenu indicator left-aligns all other indicators
      (lp: #688764)
    - unity support for firefox menubar (lp: #690447)
    - the unityshell plugin has no icon in ccsm (lp: #688594)
    - the unityshell plugin has an "unknown category" in ccsm (lp: #688592)
  * debian/control:
    - updated the dee and nux requirement.
  * debian/libunity3.symbols:
    - updated to include the new symbols
  * debian/unity.install:
    - install the ccsm icons there
 -- Sebastien Bacher <email address hidden> Fri, 17 Dec 2010 19:18:58 +0100

Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
David Prieto (frandavid100-gmail) wrote :

Just updated to 3.2.8, yet FF's menubar doesn't appear on the top panel.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

It won't because support hasn't been added to Firefox yet

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

This was fixed in libdbusmenu last week

Changed in libdbusmenu (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Closing the indicator-appmenu task. We discovered at the sprint that it's not needed for this

Changed in indicator-appmenu (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.