Jürgen Spitzmüller wrote:
Abdelrazak Younes wrote:
I've done that now. Please have a look at it, you will see that you'll
need less code and you'll have a more powerful dialog.
I've done that, but I found it rather clumsy (probably because it didn't fully
understand it).
I see that you insisted on implementing initialiseParams() and
clearParams(), that's why. You are still 'tainted' by the serialization
way ;-)
For instance, the button enabling has to be implemented
manually in each dialog, right?
Right, but in this case I think the whole dialog should be disabled instead.
I really miss the button controller
organization.
I really don't. Doing this kind of enabling per dialog should results in
less code than using this button controller. Besides, there are other
controls that needs enabling/disabling than the buttons. Sometimes the
full dialog needs to be disabled, this is the case for yours IMHO.
Maybe I should provide a pure virtual method for those things i.e.
Dialog::setReadOnly(). I'll think about it.
BTW, the paragraph dialog fails at button controlling: the
buttons are not disabled in a read-only document
I'll have a look.
(I've implemented that
manually in the Symbols dialog, and actually got more code than with the old
scheme).
I'd be surprised if it was a lot more :-)
Abdel.