Re: Mac OS X native menubar

Easy B wrote:
> Hi guys
> Now that Anders is not actively coding on the port anymore,  I guess
> nobody really is. Well I would love a nice and complete gtk port on the
> mac so I'm trying to contribute where I can. The next thing I want to
> give a try is the menubar. I'm aware of the long discussion about this
> particular case but as far as I know nobody came with a final solution.
> It was more like a discussion about creating a special api or not. Well
> in my opinion the first menubar should be mapped to the top. This way a
> lot of gtk apps would compile out of the box. If it doesn't work he
> developer or the porter needs a way to fix the menubar the way it should be.

That's just wrong.

Gtk+ must be able to solve the case when you have multiple menubars.
Evolution for instance has at least two: one in the shell
and one in the composer.

We're missing some API which each application can call to set the
current menu bar. Also remember that you need to solve the parent problem.
In Win32/X11 menus are packed to a vbox, but on Mac OS X the menus needs
to be populated differently.

A very hackish way would be to connect on parent::notify in GtkMenuBar and
force the menubar to be invisible, traverse all the children and add them
using the Cocoa API. Not perfect, but it'll allow you to get going and the
code to map GtkMenuItem to Cocoa items needs to be written anyway.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]