Closed Bug 411934 Opened 17 years ago Closed 16 years ago

More GTK Integration with the GTK Mac Menubar (Global Menu) support in Firefox 3

Categories

(Core :: Widget: Gtk, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: elhyte, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9b2) Gecko/2007121016 Firefox/3.0b2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9b2) Gecko/2007121016 Firefox/3.0b2

Hello,
I'm wondering why Firefox doesn't support the GTK Mac menubar, or GTK Global Menu.
It is shortly a way to have the Mac Look on GTK (the toolbar (File, Edit,...) separately of the main Firefox window). It is supported in all of the GTK applications, and Miro also, which it is builted from the Mozilla Toolkit, so I think that it is not too hard to integrate it into Firefox.

There are the related links:
http://ubuntuforums.org/showthread.php?t=241868 : the official forum thread
https://wiki.ubuntu.com/global_menu : the official Ubuntu Wiki Page
In the final link, you can find everything you need to integrate it into Firefox.
Thank you very much !

Reproducible: Always

Steps to Reproduce:
1. Activate GTK Global Menu as shown on the related links
2. After its installation, open Firefox
3. You normally opened a normal instance of Firefox.
Actual Results:  
The Firefox toolbar is in the window when GTK Global menu (GTK Mac Menubar) is activated.

Expected Results:  
I would like to see the Firefox toolbar outside the main window, like Mac.

This is supported by Miro, which is builted form the mozilla toolkit.
It does not depend on Distros.
It requires a patched GTK, which is described in the link of the Ubuntu Wiki page.
Additionnaly, I joined a screenshot to see the expected results, with Epiphany GTK navigator.
I think that supporting patched GTK isn't reallistic (we already have a hard time supporting vanilla GTK). In any case, not gecko 1.9 material.
Remember that MacMenubar uses GtkMenuBar, while Firefox only uses it to draw the interface.
(In reply to comment #2)
> Remember that MacMenubar uses GtkMenuBar, while Firefox only uses it to draw
> the interface.
> 
Yes, Jakub, I agree, but Miro is firefox based, isn't it ? So, why does it support the GtkMenubar ?
Miro is pygtk2 based. It embeds gtkmozembed :> .
(In reply to comment #4)
> Miro is pygtk2 based. It embeds gtkmozembed :> .
> 

Whouaw, what fast response is it !
Ok, But no chance to see this one day (in Firefox 3)?
Not in Firefox 3, no. We're too close to release (unless someone comes up with a clean small patch). Perhaps later (which is why it was decided not to close the bug with WONTFIX).

The difficulty is that to get the kind of integration you want, we need to use real GTK menus. Since Firefox is programmed in XUL, that means not creating the XUL widgets for the menus and then convert the XUL menu structure to a GTK one. This sadly means that we abandon the possibility of skining the menus with CSS (this is what Firefox themes do), and we enter a painful world of event/functionnality translation between XUL menus and native menus.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Ok, I understand this.
A last question: As a minor upgrade, will it be possible to show it including in a minor release of Firefox ?
I wouldn't be so hopeful...

That will require LOT of work. More than drawing something using GTK.

I think that Firefox 4 will be native :> .
Ok, so I have to wait one year to have this functionality :)
I'll be patient...
But I have a different idea: instead of creating a real gtkmenubar, why don't we change the patch itself for Firefox compatibility ? It will, by the way, create compatibility of all XUL-based programs.
If only it is possible...
I don't know if it is truely possible, but I seen that Gtkmenubar had supported Java/Swing applications for a little moment, si I think it should be possible...
It was ugly hack in GTK. Not ready for reall apps.

I hope you can read. Thread on Ubuntu forums had that notice.

PS: Sorry for being rude.
It's to me to be sorry: I'm a perfect newbie...
So, I have two final questions:
First: It can be ready with a little work, isn't it ?
Second: When Firefox 4 will be released :) ?
Sorry for my newbish questions.
1: I don't think so. XUL-based apps are using GTK only TO DRAW.
2: I can't answer, because I don't know.
Ok, Thank you
So I'll wait Firefox 4 :)
Anyway, if nobody have something to add, you can close the bug report.
(In reply to comment #6)
> The difficulty is that to get the kind of integration you want, we need to use
> real GTK menus. Since Firefox is programmed in XUL, that means not creating the
> XUL widgets for the menus and then convert the XUL menu structure to a GTK one.
FWIW, Firefox has native (or native-looking) menus on Mac:
http://www.dreamsoft.us/tools/help/cache/mac_firefox.html
But this solution in Mac is stable and well known, while this GTK functionality is provided only by patch, which is not supported officialy.

Until patch is accepted for GTK we shouldn't support such functionality.
I agree with you and I am working toward to make GlobalMenu ready for real apps.
The problem is that GtkMenuBar is not designed for a global menu, and neither is GTK. 

(In reply to comment #13)
> It was ugly hack in GTK. Not ready for reall apps.
> 
> I hope you can read. Thread on Ubuntu forums had that notice.
> 
> PS: Sorry for being rude.
> 

(In reply to comment #6)

> XUL widgets for the menus and then convert the XUL menu structure to a GTK one.
> This sadly means that we abandon the possibility of skining the menus with CSS
> (this is what Firefox themes do), 

What about shiping with an extra embeded theme along with the default theme, which sets some magic flag of XULRunner to make it use native widgets?

> and we enter a painful world of
> event/functionnality translation between XUL menus and native menus.
> 

It is sad and painful, but most code is written solely for this purpose, whenever we want some code reusing from any external-wares, isn't it?

What about writing some GTK and GObject, XPCOM binding first? It might also benefit mozilla in the long term.





> The problem is that GtkMenuBar is not designed for a global menu, and neither
is GTK. 

GTK is not so flexible...

> What about shiping with an extra embeded theme along with the default theme,
which sets some magic flag of XULRunner to make it use native widgets?

Is it possible?



I was thinking about copy of Firefox in native GTK with gtkmozembed, which could draw everything but menubar using XUL.
> 
> I was thinking about copy of Firefox in native GTK with gtkmozembed, which
> could draw everything but menubar using XUL.
> 
It will become another 'MyIE', a dirty(but somewhat useful, because lacking of functionality of IE) wrapper over IE activeX control.

I don't see gtkmozembed as intended for writing general purpose web browsers(just as IE activeX Control), despiting the fact that people are doing this. If many people uses a wrapped 'firefox' it will become a shame for firefox. And firefox is not that bad for people to turn toward wrapped versions at all.

If there is a gtk binding for XPCOM, exploding gtk to firefox javascript, I think most of work is just writing an javascript extesnsion which should work in a similiar way as 'Personal Menu' (https://addons.mozilla.org/en-US/firefox/addon/3895). The gtk binding can also be provided in an extension, if I understood the development guide correctly.



I'm not a developer, I was just thinking.

But if GlobalMenu will be ready, and GTK will accept some patches, then we must to quickly make support for GM.

There's no way to not support it if this will become official (I hope so!).
There are two approaches for globalmenu:
* app-drawn menubar, like now
* server-drawn menubar

If server-drawn would get favorised, then it's easier to send some data via DBus/etc, that draw it with a XUL app...
Yes.

Server-drawn global menu is applying for a SoC project.
If it is accepted, 
An X11 based version will be done at around june.
a DBus version be done at around july.

It also seems to me, that it is easier to make some RPC calling than draw it with XUL app emulating the GTK UI.

That's good that globalmenu has been proposed as SoC project. I wish you good luck :) !

> It also seems to me, that it is easier to make some RPC calling than draw it
> with XUL app emulating the GTK UI.

Of course, Firefox will have less to draw :P .
This is WONTFIX until such time as GNOME adopts this functionality officially.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
has anyone looked back at this issue since globalmenu no longer requires patched gtk?
"This is WONTFIX until such time as GNOME adopts this functionality officially."

 - The mozilla people have already spoken.
(In reply to comment #29)
> (In reply to comment #27)
> This is WONTFIX until such time as GNOME adopts this functionality officially.
> 
>  - The mozilla people have already spoken.

WOW!, i'm really impressed about how Mozilla attends his users requests.

It's REALLY Fair.
(In reply to comment #28)
> has anyone looked back at this issue since globalmenu no longer requires
> patched gtk?

No, but feel free to do so.

(In reply to comment #30)
> WOW!, i'm really impressed about how Mozilla attends his users requests.
> 
> It's REALLY Fair.

At the time this was filed, a patched gtk was required, which didn't make sense to support in core Firefox. If it's true that gtk doesn't need to be patched for this support, then the topic is open for discussion again. Patches welcome.
(In reply to comment #31)
> (In reply to comment #28)
> > has anyone looked back at this issue since globalmenu no longer requires
> > patched gtk?
> 
> No, but feel free to do so.
> 
> (In reply to comment #30)
> > WOW!, i'm really impressed about how Mozilla attends his users requests.
> > 
> > It's REALLY Fair.
> 
> At the time this was filed, a patched gtk was required, which didn't make sense
> to support in core Firefox. If it's true that gtk doesn't need to be patched
> for this support, then the topic is open for discussion again. Patches welcome.

I feel really better with your response, i'm not part of the "developers" of the Global Menu but i use it and like it.
Sorry for posting so late:

Global Menu is applying as a mentor organization in SOC 2009. 

Patching XULRunner is proposed as a student project. However we are weak at mentoring this project on the XULRunner side. 

If anyone here would like to give us a hand on mentoring the project please send an email to the project list:
gnome-globalmenu at googlegroups dot com
http://code.google.com/p/gnome2-globalmenu/wiki/SummerOfCode2009

or to me.

Thanks.
Well, start with getting GNOME to adopt the functionality, instead of a third-party addon.  my comment was pretty clear about what it would take to make support something we'd add to the core application.
Well, the goal of the proposed SOC project is not to push the patch into XUL. The goal is to implement the patch, make the solution available. -- You reminded me to state this more clearly in the proposal. 

In that case, would you like to help on mentoring: not necessarily being the mentor person but answering some questions with XUL in general?
This is for a widget and hence isn't a shell integration bug and is a Core -> Widget bug... moving
Component: Shell Integration → Widget: Gtk
Product: Firefox → Core
QA Contact: shell.integration → gtk
The global menu bar is now an official, default part of Ubuntu - only with the Netbook Remix in 10.10, but in the regular desktop version as well in 11.04:

https://launchpad.net/indicator-appmenu

XUL application support was deferred for the 10.10 release, but seems to be planned for 11.04.  Hopefully Canonical will be reaching out to you guys soon.
Stas Sușcov added the following comment to Launchpad bug #347519:

În data de Sb, 30-10-2010 la 22:51 +0000, chmmr a scris:
> The global menu bar is now an official, default part of Ubuntu - only
> with the Netbook Remix in 10.10, but in the regular desktop version as
> well in 11.04:
> 
> https://launchpad.net/indicator-appmenu
> 
> XUL application support was deferred for the 10.10 release, but seems to
> be planned for 11.04.  Hopefully Canonical will be reaching out to you
> guys soon.
> 


Just a comment to the above written, you can install it with:
apt-get install indicator-appmenu indicator-applet-appmenu appmenu-gtk

Then just add appmenu applet to your panel.


-- 
http://launchpad.net/bugs/347519
You need to log in before you can comment on or make changes to this bug.