
On Mon, 2007-04-09 at 15:04 -0700, Jon A. Cruz wrote:
One note on views, though. A given SPAction is bound to a single view, whereas a verb is global. If you have some UI that might apply to more than a single view, you'll need to track changes to active view and not hold an SPAction directly. The layers dialog code does this, and can be looked to for help.
You can access this all through the verbs themselves. So a verb has a "set_sensitive" function that can take the document that it is effecting in. So if you sent it's sensitivity to false and pass a single document in, the action will be made insensitive for that document. NULL results in all the documents having that verb as insensitive.
I don't remember ever testing this with icons though. If it doesn't work, I can give more pointers on where to look, but it should work with menu items. Try getting that working, and if the icons don't work, we'll fix that :)
--Ted