Comments
-
Greg Hurrell
(In reply to comment #0)
Currently WinSwitch never appears in the Accounts Preferences Pane's Startup Items list, so it always loads unless it has been manually uninstalled. I'm not an experienced developer, so I'm guessing, but I'm pretty sure that Menu Extras are not managed through this Pref pane interface, only applications.
That's correct. True menu extras (NSMenuExtra) are not applications but loadable bundles. The System UI Server maintains a list of loaded menu extras and each time you log in or boot up it loads the same menu extras; no applications are involved. Menu extras are added/removed by telling the System UI Server to load/unload those bundles.
Things which aren't "true" menu extras are implemented using NSStatusItem and they are not loadable bundles. They need a separate application to host them. Such an application could be added/removed to your startup items list. Most third-party tools use this technique.
What this in effect means is that true menu extras can't be managed using startup items; only applications can be managed that way.
I have some other utilities in use that add Menu Extras, but they do this by using an application which launches and then triggers the menu extra. Whether the app launches at startup is controllable in the Prefs pane.
WinSwitch is a true menu extra because that's the only way to get it to appear all the way over to the right side, as the user expects for a fast user switching menu.
It could be changed into an application that runs at login time and loads the loadable bundle, but it would also have to remove itself on every logout otherwise it would appear automatically on the next login anyway (because as noted above, the System UI Server maintains a list of loaded menu extras and automatically reloads them on subsequent logins).
This effectively amounts to installing/uninstalling itself automatically on every single run, which is not very efficient.
This enhancement would give people (for example, people who have a need to run with an otherwise "standard" menu bar for things like making screen shots and creating training video) boot-by-boot control over WinSwitch without having to install/reinstall.
I think a better workaround for the purposes of taking screenshots is the following:
1. Before the screenshot, hold down the "Command" key and drag WinSwitch out of the menu bar.
2. After the screenshot, double-click the "Activate WinSwitch" script installed into /Users/Shared to restore it to the menu bar.
Admittedly, this is not fully-automated, but the alternatively is just too ugly from a design standpoint because it would mean using NSMenuExtra in a way that violates its intended usage pattern.
-
Greg Hurrell
For the reasons stated above, marking this one as "WONTFIX" but seeing as the source is available anyone interested in going down this path knows what to do...
-
jim
Reasonable conclusion. (Sorry for the delay in my response.) Perhaps there's a way to automate unloading the bundle through applescripts, and triggering the status of those scripts through the Winswitch UI...I'll have to think it over. But your response and thoughtful comments are appreciated.
Add a comment
Comments are now closed for this issue.