2013/9/22 Sebastian Götte <jaseg@...2974...>:
I disagree. The interesting action is the selection change of a particular object. To introduce a global signal covering any selection changes and then filtering for a single object is not the right way to solve this. The object itself is the natural place to "bounce" this signal between the listener and the emitter.
Inkscape::Selection should have two additional signals: "added" and "removed", which would include the relevant SPObject as a signal parameter. This is far better than adding references to UI code in the SP tree.
Introducing this kind of UI code into the SPObject tree is not problematic by itself as long as it is only used by UI code.
If this signal is included, it will not be possible to compile the SP tree code to a separate library, because it will reference Inkscape::Selection. (I'm aware this is not yet possible at present, but that's something we should eventually plan for.)
Regards, Krzysztof