Hi Robin,
Marc Hedlund wrote:
Some Mac applications put a small icon in the right-hand area of the menu bar (see attached screenshot). These seem like a natural parallel to system tray icons on Windows.
I have a system tray icon (wx.TaskBarIcon, I mean) up and running under wxPython on Windows, but the menu I have appearing out of that is bound to the Mac Dock icon instead. Is there any way to create these menu bar icons on Mac using wxPython?
If not, I would advocate for having wx.TaskBarIcon represented on Mac with a menu bar icon. They seem like the right rendering for Mac.
Thanks for any suggestions....
There was a lot of heated discussion on wx-dev about this back when the wx.TaskBarIcon functionality was first enabled for wxMac. One side wanted the icons on the menubar because that made the most sense in light of how they work on the other platforms. The other side were the purists that made arguments about how the Apple HIG forbids things like that (which obviously doesn't stop other projects from doing it anyway <wink!>) and that an application's notification area and related menu are supposed to be done on the dock icon.
As an aside, I think it isn't necessarily the issues themselves that cause the debate to become heated. Of course, that said, I'll admit I fell into that trap a few times in the past... ;-/
There was some discussion of a compromise where the first wx.TaskBarIcon would go on the dock, and that any additional wx.TaskBarIcon's would be status items located on the menubar. I don't think this has been implemented yet however, although I'm not sure why. If Ryan is still reading this group he can probably chime in on this, otherwise asking the question on the wx-dev list will probably get some response and maybe even stimulate some changes.
IMHO the best solution is to make it an option, but to make the default behavior match that of the HIG. (I believe I stated this way back when too, though that was so long ago...) The menu bar icons have limitations, such as that they are automatically hidden by menu bars when space gets tight (and the only way to get them to reappear is to switch apps), and they also don't have nice features the dock icons have, like the ability to resize the icon to get more on the screen, or the ability to show progress (on some action) using the dock icon. I think that's part of why the HIG doesn't recommend them. (Last I checked, it doesn't forbid them, BTW, it just says they're only for use for very specific cases, namely when the program doesn't have a dock icon for whatever reason, but provides a persistent service.)
The issue with the icons being hidden is particularly prevalent on laptops, where some people are working with 13'' screens. I've had experiences with this, and having to switch back and forth between two applications just to access a menu bar icon is really annoying.
In any case, if the developer really feels that's what they want, then I'm all for letting them override the default behavior; but the dock icon is where the functionality exposed by tray bar icons on Windows is normally found in Mac programs. (e.g. iTunes, Camino, Terminal, Mail.app, etc.) Since wx is about native look and feel, I think the default should be what native and/or system apps do, particularly when the OS vendor recommends that behavior.
Thanks,
Kevin
···
On Apr 19, 2006, at 3:43 PM, Robin Dunn wrote:
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org