Re: GTK+ Mac OS X state of the union



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dominic Lachowicz wrote:
> I'm sorry for what may be a stupid question. Why do we need a bridge
> API (assuming that there's a 1:1 mapping between Cocoa and GTK+ menus)
> if we're already putting the onus on developers to:
>
> 1) Modify their menus to conform to MacOS style guidelines, including
> putting entries into special menus (e.g. the "Apple" menu), which
> don't have a GTK+ equivalent

I really don't think many (if any) developers will actually consider OS
X when creating their menus.  It's just not practical to assume they
will, and my unsubstantiated assumption is that the vast majority of GTK
developers will be targetting X11.

(FYI, the Apple menu is not modifiable on OS X by users or app
developers.  The "application name menu", however, is.)

> 2) Call GTK+-MacOS specific APIs to inject the menus into the OSX menu bar

But who's going to actually do this?  Most developers will only use an
API if it seems to have an effect on their testing.  If they're not
testing on OS X, it just doesn't seem likely.

> 3) Call #2 at appropriate times when different windows get focus (e.g. the Gimp)

This sounds somewhat kludgy, but I like it the best.  The GTK app
developer doesn't have to do anything, and the toolkit tries to do
what's right for the environment.

> Wouldn't it be preferable for the developers to just use the Cocoa
> menu-creation APIs directly?

Not really.  Who's going to actually do it?

> If we were talking about some shim that
> automatically takes any focussed window's GtkMenuBar and injects it
> into the OSX menu bar, that might be different.

This is kinda sorta what I'm talking about.  My guess is that no one
will actually accept it because it's error-prone and a bit of a hack.
It doesn't solve all our problems: we won't have a 'Preferences' or
'Quit' menu item in the application name menu, as is normal for OS X
apps, and there's of course no guarantee the menu layout will conform to
Apple's standards (which I'm not all that worried about).  But I think
it's a good start, since there's no "real" way to make a GTK app more OS
X-like without introducing some backend-specific APIs that no one is
going to use.

	-brian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEKjZg6XyW6VEeAnsRAqOiAJ46MhU+kOHRz1JQjcVF0L61I4MAIQCgldsO
Z0y86zrCFYuo6Q+XOmzcq2Q=
=8FzB
-----END PGP SIGNATURE-----



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