Re: global menubars in GTK+



On Mon, 2009-05-25 at 20:17 +0800, Davyd Madeley wrote:
> On Mon, 2009-05-25 at 22:31 +1200, John Stowers wrote:
> 
> > Did you take a look at gnome2-globalmenu [1], I use it daily
> > and find it works exceptionally well, with no code changes to Gtk+ apps.
> 
> I did.
> 
> I think the idea of guessing the menubar that you wish to make the
> global menu by walking the widget tree and pulling it out is hacky.
> 
> It's going to break applications with non-standard menubar packings.
> It's going to break on applications with multiple menubars. It suffers
> from the same basic problems as the IGE-MacOSX stuff - in that it is
> creating a proxy from GtkWidgets (which could break all kinds of
> assumptions) rather than using GtkActions.
> 
> I don't think it's a long term solution to the problem.
Neither do I. 

Did you take a look at GtkUIBuilder? I think it is a very good starting
for the solution you proposed. An alternative or an extension to
GtkUIBuilder that builds a native menubar instead of a GTK Menu Bar
would be it.

> 
> OTOH, if GTK+ had API for this, a backend could be written to power the
> gnome2-globalmenu applet from this API.

However, the reason why GGM is using GtkWidgets in favor of GtkActions
is that there are plenty of programs who don't build the menus with
GtkActions at all. 

'It's going to break applications that do not use this API.'

Otherwise using GtkUIBuilder is much less effort than the current
approach.


- Yu
> 
> > [1] http://code.google.com/p/gnome2-globalmenu



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