PDA

View Full Version : Wondering: Why doesn't Apple release the API to properly implement menubar items?




ravenvii
Nov 11, 2009, 05:41 PM
Currently apps that use the menubar have to use a hack of sorts. It's obvious they are not equal to Apple's own menubar items. You can't arrange the third-party icons to mingle with the Apple ones. When you click an item of Apple's, and move your mouse to another Apple item, the menu activates normally, but when you mouse over a third party's icon, it doesn't activate. You have to click to deactivate the menu, and click again the activate the third party menu.

I am wondering why Apple refuses to reveal the proper APIs for third parties to use for menubar items?



Catfish_Man
Nov 11, 2009, 06:17 PM
The "proper" menu items run in SystemUIServer rather than in the applications that provide them, which is a bit of a risky thing to do. Some sort of in-between solution (perhaps something like how DockTile plugins work) seems appropriate. Have you filed a request with Apple for this at bugreport.apple.com?

sammich
Nov 11, 2009, 06:22 PM
When you click an item of Apple's, and move your mouse to another Apple item, the menu activates normally, but when you mouse over a third party's icon, it doesn't activate. You have to click to deactivate the menu, and click again the activate the third party menu.

I've never noticed that. Now I'm gonna get annoyed by it :mad: However, iStatMenus doesn't behave like this, it activates like a menu item should, but others like Bowtie and Adium don't, like you said.

I am wondering why Apple refuses to reveal the proper APIs for third parties to use for menubar items?

Chances are Apple wants to keep things clean and uncluttered.

kainjow
Nov 11, 2009, 09:39 PM
It's been like this since the beginning (AFAIK). I guess there isn't enough demand from developers for Apple to change it. Like Catfish_Man mentioned they probably will never open the existing API because each menu is a plugin managed by SystemUIServer and if one of those plugins crash, down goes the entire SystemUIServer process and all those menu items are gone (until it relaunches). I've seen it happen several times with Spotlight being the culprit.

There's no reason they can't come up with some solution for integrating Apple menus with third-parties smoothly. I think they're just lazy ;)

HiRez
Nov 12, 2009, 12:51 PM
MenuMeters seems to function "correctly" (it'll drop down its menus after clicking on an Apple menu and moving to MM).

kainjow
Nov 12, 2009, 01:06 PM
MenuMeters seems to function "correctly" (it'll drop down its menus after clicking on an Apple menu and moving to MM).

Looks like they use MenuCracker though.