Last Comment Bug 411934 - More GTK Integration with the GTK Mac Menubar (Global Menu) support in Firefox 3
: More GTK Integration with the GTK Mac Menubar (Global Menu) support in Firefox 3
Status: RESOLVED WONTFIX
:
Product: Core
Classification: Components
Component: Widget: Gtk (show other bugs)
: unspecified
: x86 Linux
: -- enhancement with 7 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
https://wiki.ubuntu.com/global_menu?a...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-11 09:46 PST by Noé Kira
Modified: 2010-11-20 09:37 PST (History)
16 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Noé Kira 2008-01-11 09:46:22 PST
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.
Comment 1 Julien "_FrnchFrgg_" RIVAUD 2008-01-17 14:46:33 PST
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.
Comment 2 Jakub 'Livio' Rusinek 2008-02-09 06:10:43 PST
Remember that MacMenubar uses GtkMenuBar, while Firefox only uses it to draw the interface.
Comment 3 Noé Kira 2008-02-09 13:22:47 PST
(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 ?
Comment 4 Jakub 'Livio' Rusinek 2008-02-09 13:28:52 PST
Miro is pygtk2 based. It embeds gtkmozembed :> .
Comment 5 Noé Kira 2008-02-09 13:36:25 PST
(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)?
Comment 6 Julien "_FrnchFrgg_" RIVAUD 2008-02-09 14:32:39 PST
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.
Comment 7 Noé Kira 2008-02-09 15:00:41 PST
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 ?
Comment 8 Jakub 'Livio' Rusinek 2008-02-09 15:15:49 PST
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 :> .
Comment 9 Noé Kira 2008-02-10 01:27:38 PST
Ok, so I have to wait one year to have this functionality :)
I'll be patient...
Comment 10 Noé Kira 2008-02-10 02:16:59 PST
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.
Comment 11 Jakub 'Livio' Rusinek 2008-02-10 02:32:11 PST
If only it is possible...
Comment 12 Noé Kira 2008-02-10 02:43:36 PST
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...
Comment 13 Jakub 'Livio' Rusinek 2008-02-10 03:14:12 PST
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.
Comment 14 Noé Kira 2008-02-10 04:06:05 PST
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.
Comment 15 Jakub 'Livio' Rusinek 2008-02-10 06:12:52 PST
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.
Comment 16 Noé Kira 2008-02-10 06:19:50 PST
Ok, Thank you
So I'll wait Firefox 4 :)
Anyway, if nobody have something to add, you can close the bug report.
Comment 17 Christian Schmidt 2008-02-17 13:05:12 PST
(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
Comment 18 Jakub 'Livio' Rusinek 2008-02-17 13:15:04 PST
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.
Comment 19 Feng Yu 2008-02-18 08:57:08 PST
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.
> 

Comment 20 Feng Yu 2008-02-18 09:06:08 PST
(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.





Comment 21 Jakub 'Livio' Rusinek 2008-02-18 10:29:29 PST
> 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.
Comment 22 Feng Yu 2008-02-18 11:29:20 PST
> 
> 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.



Comment 23 Jakub 'Livio' Rusinek 2008-02-18 11:43:09 PST
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!).
Comment 24 Jakub 'Livio' Rusinek 2008-04-05 13:00:51 PDT
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...
Comment 25 Feng Yu 2008-04-05 13:42:44 PDT
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.

Comment 26 Jakub 'Livio' Rusinek 2008-04-05 13:54:13 PDT
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 .
Comment 27 Mike Connor [:mconnor] 2008-06-29 23:02:25 PDT
This is WONTFIX until such time as GNOME adopts this functionality officially.
Comment 28 phwelo 2008-12-12 22:20:11 PST
has anyone looked back at this issue since globalmenu no longer requires patched gtk?
Comment 29 Feng Yu 2008-12-13 15:13:03 PST
"This is WONTFIX until such time as GNOME adopts this functionality officially."

 - The mozilla people have already spoken.
Comment 30 ssthormess 2008-12-14 23:08:16 PST
(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.
Comment 31 Reed Loden [:reed] (use needinfo?) 2008-12-14 23:11:39 PST
(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.
Comment 32 ssthormess 2008-12-14 23:14:37 PST
(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.
Comment 33 Feng Yu 2009-03-13 00:07:14 PDT
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.
Comment 34 Mike Connor [:mconnor] 2009-03-13 00:33:12 PDT
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.
Comment 35 Feng Yu 2009-03-13 08:43:01 PDT
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?
Comment 36 Robert Strong [:rstrong] (use needinfo to contact me) 2009-03-13 11:50:02 PDT
This is for a widget and hence isn't a shell integration bug and is a Core -> Widget bug... moving
Comment 37 JPL 2010-10-30 15:51:03 PDT
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.
Comment 38 Launchpad 2010-10-30 17:32:21 PDT
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

Note You need to log in before you can comment on or make changes to this bug.