Is the Wx:TaskBarIcon supported under OS X? I can’t seem to get it
working. My code works under Windows, but not OS X. I thought it was
something I was doing, so I tried the bigdemo.rb sample and that
doesnt’ seem to like OS X either.
I’m running OS X 10.5 with wxRuby 1.9.5 gem and ruby 1.8.6.
-dave
David G. wrote:
Is the Wx:TaskBarIcon supported under OS X? I can’t seem to get it
working. My code works under Windows, but not OS X. I thought it was
something I was doing, so I tried the bigdemo.rb sample and that
doesnt’ seem to like OS X either.
It does work, but perhaps not in the way you were expecting. wxWidgets
considers the ‘TaskBar’ on OS X to be the dock; if you run bigdemo, you
should see that the icon in the dock is changed, and has the taskbar
menu associated with it.
The purpose of the standard desktop elements (eg dock, menu bar, Windows
taskbar) don’t map exactly from OS to OS, but I think this is seen as
the closest equivalent. According to the Apple HIG, the area on the
right of the Menu Bar, where the power status, volume, clock etc is
“reserved for use by Apple”.
http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGMOSXEnvironment/chapter_8_section_4.html#//apple_ref/doc/uid/TP40002721-TPXREF139
http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGMenus/chapter_17_section_4.html#//apple_ref/doc/uid/TP30000356-CHDFJEAC
PS - there does seem to be a bug on OS X changing the Doc icon. But
otherwise it works fine.
cheers
alex
Thanks, Alex. You are correct. It does work, just not in the way I was
looking for. Actually, I have come to expect apps to have an icon on
the right of the menu bar if they are meant to run in the
background…like Skype, GMail notifier, etc. I never knew that Apple
considered that incorrect. I’ve never used a menu from the dock icon
either, but now that I’m checking some of my favorite apps out they
have some pretty useful features in there. Very good to know!
I don’t know if this is a issue better taken up with the wxWidgets
developers, but you may consider (even though the Apple HIG guidelines
frown on it) that developers will want to be able to put icons on the
right side of the menu bar.
-dave
David G. wrote:
I don’t know if this is a issue better taken up with the wxWidgets
developers, but you may consider (even though the Apple HIG guidelines
frown on it) that developers will want to be able to put icons on the
right side of the menu bar.
It’s something that would be implemented in wxWidgets. It’s been
discussed before:
http://lists.wxwidgets.org/archive/wx-dev/msg40258.html
but it seems to be ruled out by one of the wxWidgets OS X lead devs:
http://lists.wxwidgets.org/archive/wx-dev/msg40273.html
FWIW, I agree with that reasoning.
If you were really certain that a menu bar icon was what you wanted, you
might be able to create one using Ruby Cocoa. From that htread, looks
like the relevant class is NSStatusBarItem.
cheers
alex