FFE: Firefox and Thunderbird (XUL) menus don't appear in the global menu bar

Reported by Andreas Albert on 2010-09-14
272
This bug affects 55 people
Affects Status Importance Assigned to Milestone
Application Menu Indicator
Undecided
Unassigned
firefox (Ubuntu)
High
Chris Coulson
Natty
High
Chris Coulson
thunderbird (Ubuntu)
Undecided
Unassigned
Natty
Undecided
Unassigned

Bug Description

Firefox's and Thunderbird's menus do not appear in the Unity menu bar or "Indicator Applet Appmenu".

In Maverick, this work was put off until Maverick+1 on the grounds that Unity was being used only in UNE, and Firefox was not gong to be used in UNE.

A Firefox extension <http://gitorious.org/firefox-gnome-globalmenu/firefox-gnome-globalmenu> may provide a base for the code to implement this.

Chris Coulson is working on an extension to add support in XUL applications for indicator-appmenu, which can be found on Launchpad <https://launchpad.net/globalmenu-extension>.

Owais Lone (loneowais) wrote :

Firefox in an XUL application not GTK. Right now focus is on GTK and some QT apps. XUL will be taken care of in the next cycle I assume.

Ok...

I agree.

David Barth (dbarth) wrote :

Confirmed, ie it doesn't work, and was not a target for Maverick.

David Barth (dbarth) wrote :

Besides, the application should not on appmenu's blacklist, so it should use it's own menus and the default panel menu (stubs, ie File/Edit) should not be present anymore.

Changed in indicator-appmenu:
status: New → Invalid
Matthew Paul Thomas (mpt) wrote :

This bug is not invalid: Firefox's and Thunderbird's menus should appear in the menu bar, just like they do in Mac OS X for example.

Changed in indicator-appmenu:
status: Invalid → New
description: updated
summary: - appmenu don't work with firefox 3.6.9
+ Firefox and Thunderbird (XUL) menus don't appear in the menu bar

Marking as invalid for the indicator-appmenu tasks and adding a xulrunner one. I dont' beleive there is any changes required to indicator-appmenu for this to work, only to xulrunner.

Changed in xulrunner (Ubuntu):
assignee: nobody → Chris Coulson (chrisccoulson)
Changed in indicator-appmenu (Ubuntu):
status: New → Invalid
Changed in indicator-appmenu:
status: New → Invalid
Changed in xulrunner (Ubuntu):
assignee: Chris Coulson (chrisccoulson) → nobody
Chris Coulson (chrisccoulson) wrote :

I took a look at the firefox-gnome-globalmenu extension. It has a few problems though:

- It has a lot of caveats about non-functioning menus in the TODO file
- It doesn't hide the Firefox rendered menu bar (so you have 2 bars)
- It's quite a hacky implementation (walking the dom tree to build a load of xml. I'm not sure how well this would scale to large menus).

I think the only way to do this properly is to source patch Firefox to basically do what already happens on the Mac, by providing our own nsINativeMenuService implementation

affects: xulrunner (Ubuntu) → firefox (Ubuntu)
Changed in firefox (Ubuntu):
assignee: nobody → Chris Coulson (chrisccoulson)
importance: Undecided → High
status: New → Triaged
Pierre Slamich (pierre-slamich) wrote :

Another extension does exist to hide the menubar in Firefox, but your approach seems the best, both for Firefox and for Ubuntu in the long run.

Paul Sladen (sladen) on 2010-11-27
summary: - Firefox and Thunderbird (XUL) menus don't appear in the menu bar
+ Firefox and Thunderbird (XUL) menus don't appear in the global menu bar

OpenOffice doesn't appear in the global menu bar either for some reason.

Chris Coulson (chrisccoulson) wrote :

That's a different bug. They use different toolkits, this bug is Gecko specific

Kenny Strawn (kenny-strawn) wrote :

OpenOffice doesn't appear in the global menu bar either for some reason.

Kenny Strawn (kenny-strawn) wrote :

Sorry; apparently I posted duplicate comments because Firefox froze when the first comment was posted.

Carl Simpson (cwd-simpson) wrote :

Updated the description to include a link to Mr. Coulson's globalmenu-extension project, since that information is relevant to anyone who is interested in this bug.

description: updated
David Barth (dbarth) wrote :

@ks64: openoffice is tracked in a separate bug, and it's currently not supported by the appmenu system, being neither GTK, nor Gnome, nor XUL.

David Barth (dbarth) wrote :
Matt Sturgeon (mattsturgeon) wrote :

Is a firefox (high-level) extension really the right way to go about this?

Would it not be better to patch XULRunner (Gecko) to be compliant with indicator-appmenu (the back-end for Unity's menu and indicator-applet-appmenu). This would then apply to ANY XUL/Gecko based application with a Menu Bar and would work on any system with libindicate and indicator-appmenu.

It would need to: a) Send menus over DBus. and b) If menu is being drawn elsewhere - do not draw menu within window.

Basically it would mean porting Chris Coulson's code to XULRunner, instead of an XUL extension...

Chris Coulson (chrisccoulson) wrote :

Hmmm, well, my extension already does both a) and b) (and those requirements are fairly obvious, you didn't really need to specify them ;) )

In addition to that, it's design is basically the same as it would be if it was part of Mozilla core, so technically it doesn't matter if it's an extension or not as it would end up being pretty much the same code. It has been designed that way from the start with the intention that it would be merged in to Mozilla core at some point in the future.

I'm not sure what you mean when you refer to it as a "high-level" extension. If you're referring to where it sits in the stack, you might want to check out the code....

Chris Coulson (chrisccoulson) wrote :

Note, the extension basically implements a slightly modified version of the nsINativeMenuService interface (see http://hg.mozilla.org/mozilla-central/file/fb8e4cdf2346/widget/public/nsINativeMenuService.h), which is what is used on the Mac version already.

Matt Sturgeon (mattsturgeon) wrote :

Sounds good..
And regarding the "high-level" thing, I was referring to it as high-level software, not a high-level add-on/extension or high-level code execution.

How difficult would it be to port this to become a XULRunner (it is XULRunner that renders XUL windows - right?) patch?
I mean, if Mozilla don't accept it then we could always add it to our infamous list of Ubuntu-specific patches ;)

Chris Coulson (chrisccoulson) wrote :

If Mozilla don't accept it, then we can't add it as a patch anyway. Even if they do accept it, it could take a while (not in Natty timeframe), and I'm not prepared to maintain such a substantial patch for 18 months. Having to maintain the same patch in Firefox, Thunderbird and xulrunner, and having to refresh it to apply again every few weeks when there is a security update is a maintenance burden and would create even more work for me.

I'm not sure why you're so obsessed with converting this in to a patch for me to maintain instead, it makes absolutely no difference for users but makes my life difficult instead.

Like I've said already in this bug report, and another one where you bought up the same issue as well - the plan is for this to become part of Mozilla core. As I've said already, I'm already working on that so please stop asking the same questions and making the same point over and over again.

Matt Sturgeon (mattsturgeon) wrote :

I appologize for repeating my self - I honestly didn't remember asking the question before.
Your doing a great job with your code, and the long term target seems amazing (XUL supporting global menu without extensions).
So I apologize for harassing you, and request you keep up the amazing work :)

Ted Gould (ted) wrote :

It seems to me that this is further along that "triaged" (I'm using the menus now) is that the appropriate status?

Chris Coulson (chrisccoulson) wrote :

I've landed this for Thunderbird now, it should be available in a few hours

Martin Pitt (pitti) on 2011-02-10
affects: indicator-appmenu (Ubuntu Natty) → thunderbird (Ubuntu Natty)
Changed in thunderbird (Ubuntu Natty):
status: Invalid → Fix Released
Martin Pitt (pitti) wrote :

Original FFE was in bug 727068, duplicated.

This has been tested by several desktop team members for several weeks now, and was just blocked by an OK of Mozilla. Approved for upload after alpha-3.

summary: - Firefox and Thunderbird (XUL) menus don't appear in the global menu bar
+ FFE: Firefox and Thunderbird (XUL) menus don't appear in the global menu
+ bar
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package firefox - 4.0~b12+build1+nobinonly-0ubuntu3

---------------
firefox (4.0~b12+build1+nobinonly-0ubuntu3) natty; urgency=low

  * Land the Unity appmenu extension work. It's shipped in its own package,
    although we build it from the Firefox source tree (LP: #637827)
  * Fix build with system NSPR
    - update debian/firefox-dev.install.in
  * Don't trample on existing alternatives in the postinst script if
    we detect Ubuntuzilla breakage
    - update debian/firefox.postinst.in
 -- Chris Coulson <email address hidden> Thu, 03 Mar 2011 16:18:56 +0000

Changed in firefox (Ubuntu Natty):
status: Triaged → Fix Released
Anthony Martinez (comeheresam) wrote :

Unable to import Firefox bookmarks because Show All Bookmarks does not reveal menu"Organize, Views, Import/Backup".
Plain Natty fresh install -- NO Compiz. Stuck with Classic until this is fixed.

I have 5.0+build1+nobinonly-0ubuntu0.11.04.2 and the menu does not show.
It was there before.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints