bulia byak wrote:
Gradient dragger does indeed make sense in many tools, not only in those two - or rather, its absense would make little sense. I agree that tools code and especially the gigantic toolbox.cpp may benefit from some refactoring, but gradient dragger is pretty orthogonal to all this and that's a good thing.
Oops, obviously it makes sense in other tools too (like the shape tools). However, some tools might not need the dragger (like the paint bucket or tweak), so placing it at the second level of the class hierarchy (e.g. Tool<-GradientEditor<-Shape<-Rectangle) seems wise.
bulia byak wrote:
I think undoability is the property of XML tree and need not be introduced into verbs, which may represent any kind of action at all, be it changing the document or not. As far as I remember, right now we already can directly add verbs to toolbars, no?
I was a bit unclear. Inkscape::UndoableAction would be just a specific kind of Action. Gtk::Action or a derived class would replace Inkscape::Verb. The verbs that don't modify the XML tree would just derive from Gtk::Action, so verbs won't have to be undoable. There's also SPAction, but I have no idea what it does yet...
I know about the toolbars. Still, I think GTK and other libraries Inkscape depends on are preferred over custom code that does the same - in this case, Gtk::UIManager to generate menus and toolbars from XML descriptions and Gtk::Action to describe actions (verbs).
Regards, Krzysztof Kosiński.