Abdelrazak Younes wrote:
> But in this case I am sure we will find a simpler solution. I am sorry
> to say that your patch looks a bit complicated for the problem we have
> at hand. 
The complications, if I'm not mistaken, are due to the use of a combobox
and the need to track what's in it. Almost all of the new code is
devoted to that.

I thought about radio buttons, and we could go that way.
> So, what do we need? How many choice do we need for the alignment? I'd
> say 4:
>        case LYX_ALIGN_BLOCK:        return "Justified";
>        case LYX_ALIGN_LEFT:        return "Left";
>        case LYX_ALIGN_RIGHT:        return "Right";
>        case LYX_ALIGN_CENTER:     return "Center";
> I think we'd better served by 4 radio buttons instead of a Combo.
>
> Then we need to take into account the "Default" case.
>        case LYX_ALIGN_LAYOUT:    return "Default";
> Here a simple check box will do.
The reason I didn't prefer this option is that I didn't want to list
BOTH (say) "Justified" AND "Default" but rather to list it as "Justified
(Default)". I suppose it's possible to rewrite the radio button's label
rather than to repopulate the combobox, but that could lead to alignment
issues in the dialog.
> Then a more complicated one:
>        case LYX_ALIGN_NONE:         return "None";
> Am I right in that no modification is allowed here? I yes, then no
> choice should be permitted and the controls above should be disabled.
This one kind of puzzles me. I grepped the code and the only substantive
occurrence of it is in lyxlayout.C, in readAlignPossible. But since
AT_LAYOUT is pushed onto the stack at the beginning of that routine,
LYX_ALIGN_NONE can never be returned. So it will never be the layout of
anything.
> This one I don't understand:
>        case LYX_ALIGN_SPECIAL:    return "Special";
There are no substantial occurrences of this in the code.

Thanks for the other comments.

Richard

-- 
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to