Ah I see, he was using a special interface and not the Inkscape::Selection. That explains the problem.
Off topic somewhat:
Tell me, does inkscape have a way to turn used colours into a pallet? I just tested the 'auto' pallet and it didn't do anything. So I'm not sure what 'auto' does, nor if the idea of a used-colour pallet has been implemented yet.
Martin,
On Fri, 2013-07-05 at 19:33 +0200, Krzysztof KosiĆski wrote:
The 'coloring mechanism', e.g. the paint selector in the bottom left corner and the underlying code, is not designed to work with multiple objects, and should not be. As I understand, MODE_RECOLOR would be an awful hack and trying to push a square peg through a round hole. You need to work with the Inkscape::Selection object directly. You can access this object through SPDesktop. If you need some helper functions from the paint selector, refactor them so that they're not bound to the paint selector object.
To update the dialog when the color of objects in the selection changes, you can use XML observers. (Admittedly, the lack of any notification mechanism on the SP tree level is a major design shortcoming.)