Re: [PATCH] Reworking of Paragraph Settings Dialog
Jürgen Spitzmüller wrote: Richard Heck wrote: Use this paragraph's default alignment (Justified) That's fine with me, though I'd suggest the instead of this, as that is OK for the multi-paragraph case, too. Oh no, please don't. Use tooltips for verbose hints (you can't imagine how long this label will be in the German translation). Usability is more important. And if need be, the German translation can just omit some of the unnecessary details in the text. Regards, Asger
Re: [PATCH] Reworking of Paragraph Settings Dialog
Jürgen Spitzmüller wrote: Richard Heck wrote: "Use this paragraph's default alignment (Justified)" That's fine with me, though I'd suggest "the" instead of "this", as that is OK for the multi-paragraph case, too. Oh no, please don't. Use tooltips for verbose hints (you can't imagine how long this label will be in the German translation). Usability is more important. And if need be, the German translation can just omit some of the "unnecessary" details in the text. Regards, Asger
[PATCH] Reworking of Paragraph Settings Dialog
The attached patch deals with most of the remaining issues with the Paragraph Settings dialog, after the long discussion about how to do it. I've redesigned the dialog itself in accord with some ideas of Edwin's, adapting also some suggestions of Helge's. A screenshot is attached. This separates out Default a bit, changes the label to Default for Current Paragraph---I think that makes it a little clearer to users what this does---and makes some space for adding (Justifed) without alignment issues. Something even better, in the non-multi-paragraph case, might be to make it say Default for Standard or Default for Itemize or whatever. But I think doing this will involve rather more work, as the extant controller doesn't provide access to this. There is one remaining issue, namely, that what the default is isn't indicated here, because I haven't had time to figure out how to determine if there is a multi-paragraph selection. And, fortunately, for me, I'm going on vacation for a week and a half on Thursday and am very unlikely to be able to do that before then. So I'm hoping someone else will finish that bit---Abdel, JMarc? The only thing that needs doing is to replace the silly: bool const isMultiParagraph = false; in QParagraphDialog::checkAlignmentRadioButtons() with something sensible. The other needed code is already there. Also, there are a couple FIXMEs here that refer to the fact that LYX_ALIGN_LAYOUT isn't required to be a possible alignment. Obviously, it should be. The second patch I've attached makes this change---and another one, namely: Why should LYX_ALIGN_BLOCK be possible by default? No good reason, so far as I can see. With this, the two FIXMEs can be fixed (and I think a proper solution for some other bugs also comes into sight, but later). If anyone wants to sort this out, too, that'd be great. I can commit all of this later tonight if someone tells me how to deal with the multi-paragraph bit. Or someone can fix that and commit it for me. I don't care. Either way. 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 inline: snap14.pngIndex: src/Paragraph.cpp === --- src/Paragraph.cpp (revision 18892) +++ src/Paragraph.cpp (working copy) @@ -1781,8 +1781,13 @@ os \\noindent ; column += 10; } + + LyXAlignment const curAlign = params().align(); - switch (params().align()) { + if (curAlign == layout()-align) + return column; + + switch (curAlign) { case LYX_ALIGN_NONE: case LYX_ALIGN_BLOCK: case LYX_ALIGN_LAYOUT: @@ -1798,7 +1803,7 @@ break; } - switch (params().align()) { + switch (curAlign) { case LYX_ALIGN_NONE: case LYX_ALIGN_BLOCK: case LYX_ALIGN_LAYOUT: Index: src/ParagraphParameters.cpp === --- src/ParagraphParameters.cpp (revision 18892) +++ src/ParagraphParameters.cpp (working copy) @@ -279,14 +279,11 @@ // This needs to be done separately params.labelWidthString(par.getLabelWidthString()); - // Alignment - Layout_ptr const layout = par.layout(); - if (params.align() == LYX_ALIGN_LAYOUT) - params.align(layout-align); - ostringstream os; params.write(os); + Layout_ptr const layout = par.layout(); + // Is alignment possible os \\alignpossible layout-alignpossible '\n'; Index: src/Text2.cpp === --- src/Text2.cpp (revision 18892) +++ src/Text2.cpp (working copy) @@ -649,16 +649,12 @@ params.spacing(spacing); // does the layout allow the new alignment? - Layout_ptr const layout = par.layout(); - - if (align == LYX_ALIGN_LAYOUT) - align = layout-align; - if (align layout-alignpossible) { - if (align == layout-align) -params.align(LYX_ALIGN_LAYOUT); - else -params.align(align); - } + //FIXME The reason we need the first check is because + //LYX_ALIGN_LAYOUT isn't required to be possible. It + //should be...and will be. + if ((align == LYX_ALIGN_LAYOUT) || + (align par.layout()-alignpossible)) + params.align(align); par.setLabelWidthString(labelwidthstring); params.noindent(noindent); } Index: src/frontends/qt4/QParagraph.h === --- src/frontends/qt4/QParagraph.h (revision 18892) +++ src/frontends/qt4/QParagraph.h (working copy) @@ -44,8 +44,8 @@ QParagraph * form_; typedef std::mapLyXAlignment, QRadioButton * QPRadioMap; QPRadioMap radioMap; -// typedef std::mapLyXAlignment, std::string QPAlignmentLabels; -//
Re: [PATCH] Reworking of Paragraph Settings Dialog
perhaps this can make it into rc2? Richard Heck wrote: The attached patch deals with most of the remaining issues with the Paragraph Settings dialog, after the long discussion about how to do it. I've redesigned the dialog itself in accord with some ideas of Edwin's, adapting also some suggestions of Helge's. A screenshot is attached. This separates out Default a bit, changes the label to Default for Current Paragraph---I think that makes it a little clearer to users what this does---and makes some space for adding (Justifed) without alignment issues. Something even better, in the non-multi-paragraph case, might be to make it say Default for Standard or Default for Itemize or whatever. But I think doing this will involve rather more work, as the extant controller doesn't provide access to this. There is one remaining issue, namely, that what the default is isn't indicated here, because I haven't had time to figure out how to determine if there is a multi-paragraph selection. And, fortunately, for me, I'm going on vacation for a week and a half on Thursday and am very unlikely to be able to do that before then. So I'm hoping someone else will finish that bit---Abdel, JMarc? The only thing that needs doing is to replace the silly: bool const isMultiParagraph = false; in QParagraphDialog::checkAlignmentRadioButtons() with something sensible. The other needed code is already there. Also, there are a couple FIXMEs here that refer to the fact that LYX_ALIGN_LAYOUT isn't required to be a possible alignment. Obviously, it should be. The second patch I've attached makes this change---and another one, namely: Why should LYX_ALIGN_BLOCK be possible by default? No good reason, so far as I can see. With this, the two FIXMEs can be fixed (and I think a proper solution for some other bugs also comes into sight, but later). If anyone wants to sort this out, too, that'd be great. I can commit all of this later tonight if someone tells me how to deal with the multi-paragraph bit. Or someone can fix that and commit it for me. I don't care. Either way. Richard
Re: [PATCH] Reworking of Paragraph Settings Dialog
On Tuesday 26 June 2007 18:55:01 Edwin Leuven wrote: perhaps this can make it into rc2? Nope. If there is a consensus about this patch I will consider it for post rc2. -- José Abílio
Re: [PATCH] Reworking of Paragraph Settings Dialog
Richard Heck wrote: changes the label to Default for Current Paragraph---I think that makes it a little clearer to users what this does---and makes some space for adding (Justifed) without alignment issues. May I suggest to name it Built-in Alignment for Current Paragraph (Justified) instead? If you don't like the word Built-in, then please make it Default Alignment for Current Paragraph (Justified) to make it *extra* clear what default we are talking about. There is room enough, according to the screen shot. Regards, Asger
Re: [PATCH] Reworking of Paragraph Settings Dialog
José Matos wrote: On Tuesday 26 June 2007 18:55:01 Edwin Leuven wrote: perhaps this can make it into rc2? Nope. If there is a consensus about this patch I will consider it for post rc2. i thought you established the consensus by your coin toss?
Re: [PATCH] Reworking of Paragraph Settings Dialog
On Tuesday 26 June 2007 19:08:56 Edwin Leuven wrote: i thought you established the consensus by your coin toss? So that just means that I will toss the coin again, what is the problem? ;-) -- José Abílio
Re: [PATCH] Reworking of Paragraph Settings Dialog
José Matos wrote: On Tuesday 26 June 2007 19:08:56 Edwin Leuven wrote: i thought you established the consensus by your coin toss? So that just means that I will toss the coin again, what is the problem? ;-) none really, i just thought i noticed some inconsistency between this mail and a previous one. the sequential coin tossing explains a lot though... (your students must love your grading ;-)
Re: [PATCH] Reworking of Paragraph Settings Dialog
Asger Ottar Alstrup wrote: instead? If you don't like the word Built-in, then please make it Default Alignment for Current Paragraph (Justified) to make it *extra* clear what default we are talking about. There is room enough, according to the screen shot. or even more verbose: Use this paragraph's default alignment (Justified) (to make it more explicit that there is a paragraph specific default alignment)
Re: [PATCH] Reworking of Paragraph Settings Dialog
On Tue, Jun 26, 2007 at 08:38:01PM +0200, Edwin Leuven wrote: José Matos wrote: On Tuesday 26 June 2007 19:08:56 Edwin Leuven wrote: i thought you established the consensus by your coin toss? So that just means that I will toss the coin again, what is the problem? ;-) none really, i just thought i noticed some inconsistency between this mail and a previous one. the sequential coin tossing explains a lot though... (your students must love your grading ;-) As a lecturer one is supposed to be feared, not loved... Andre'
Re: [PATCH] Reworking of Paragraph Settings Dialog
Edwin Leuven wrote: Asger Ottar Alstrup wrote: instead? If you don't like the word Built-in, then please make it Default Alignment for Current Paragraph (Justified) to make it *extra* clear what default we are talking about. There is room enough, according to the screen shot. or even more verbose: Use this paragraph's default alignment (Justified) That's fine with me, though I'd suggest the instead of this, as that is OK for the multi-paragraph case, too. 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
Re: [PATCH] Reworking of Paragraph Settings Dialog
Richard Heck wrote: Use this paragraph's default alignment (Justified) That's fine with me, though I'd suggest the instead of this, as that is OK for the multi-paragraph case, too. Oh no, please don't. Use tooltips for verbose hints (you can't imagine how long this label will be in the German translation). Jürgen
[PATCH] Reworking of Paragraph Settings Dialog
The attached patch deals with most of the remaining issues with the Paragraph Settings dialog, after the long discussion about how to do it. I've redesigned the dialog itself in accord with some ideas of Edwin's, adapting also some suggestions of Helge's. A screenshot is attached. This separates out "Default" a bit, changes the label to "Default for Current Paragraph"---I think that makes it a little clearer to users what this does---and makes some space for adding "(Justifed)" without alignment issues. Something even better, in the non-multi-paragraph case, might be to make it say "Default for Standard" or "Default for Itemize" or whatever. But I think doing this will involve rather more work, as the extant controller doesn't provide access to this. There is one remaining issue, namely, that what the default is isn't indicated here, because I haven't had time to figure out how to determine if there is a multi-paragraph selection. And, fortunately, for me, I'm going on vacation for a week and a half on Thursday and am very unlikely to be able to do that before then. So I'm hoping someone else will finish that bit---Abdel, JMarc? The only thing that needs doing is to replace the silly: bool const isMultiParagraph = false; in QParagraphDialog::checkAlignmentRadioButtons() with something sensible. The other needed code is already there. Also, there are a couple "FIXME"s here that refer to the fact that LYX_ALIGN_LAYOUT isn't required to be a possible alignment. Obviously, it should be. The second patch I've attached makes this change---and another one, namely: Why should LYX_ALIGN_BLOCK be possible by default? No good reason, so far as I can see. With this, the two FIXMEs can be fixed (and I think a proper solution for some other bugs also comes into sight, but later). If anyone wants to sort this out, too, that'd be great. I can commit all of this later tonight if someone tells me how to deal with the multi-paragraph bit. Or someone can fix that and commit it for me. I don't care. Either way. 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 <>Index: src/Paragraph.cpp === --- src/Paragraph.cpp (revision 18892) +++ src/Paragraph.cpp (working copy) @@ -1781,8 +1781,13 @@ os << "\\noindent "; column += 10; } + + LyXAlignment const curAlign = params().align(); - switch (params().align()) { + if (curAlign == layout()->align) + return column; + + switch (curAlign) { case LYX_ALIGN_NONE: case LYX_ALIGN_BLOCK: case LYX_ALIGN_LAYOUT: @@ -1798,7 +1803,7 @@ break; } - switch (params().align()) { + switch (curAlign) { case LYX_ALIGN_NONE: case LYX_ALIGN_BLOCK: case LYX_ALIGN_LAYOUT: Index: src/ParagraphParameters.cpp === --- src/ParagraphParameters.cpp (revision 18892) +++ src/ParagraphParameters.cpp (working copy) @@ -279,14 +279,11 @@ // This needs to be done separately params.labelWidthString(par.getLabelWidthString()); - // Alignment - Layout_ptr const & layout = par.layout(); - if (params.align() == LYX_ALIGN_LAYOUT) - params.align(layout->align); - ostringstream os; params.write(os); + Layout_ptr const & layout = par.layout(); + // Is alignment possible os << "\\alignpossible " << layout->alignpossible << '\n'; Index: src/Text2.cpp === --- src/Text2.cpp (revision 18892) +++ src/Text2.cpp (working copy) @@ -649,16 +649,12 @@ params.spacing(spacing); // does the layout allow the new alignment? - Layout_ptr const & layout = par.layout(); - - if (align == LYX_ALIGN_LAYOUT) - align = layout->align; - if (align & layout->alignpossible) { - if (align == layout->align) -params.align(LYX_ALIGN_LAYOUT); - else -params.align(align); - } + //FIXME The reason we need the first check is because + //LYX_ALIGN_LAYOUT isn't required to be possible. It + //should be...and will be. + if ((align == LYX_ALIGN_LAYOUT) || + (align & par.layout()->alignpossible)) + params.align(align); par.setLabelWidthString(labelwidthstring); params.noindent(noindent); } Index: src/frontends/qt4/QParagraph.h === --- src/frontends/qt4/QParagraph.h (revision 18892) +++ src/frontends/qt4/QParagraph.h (working copy) @@ -44,8 +44,8 @@ QParagraph * form_; typedef std::mapQPRadioMap; QPRadioMap radioMap; -// typedef std::map
Re: [PATCH] Reworking of Paragraph Settings Dialog
perhaps this can make it into rc2? Richard Heck wrote: The attached patch deals with most of the remaining issues with the Paragraph Settings dialog, after the long discussion about how to do it. I've redesigned the dialog itself in accord with some ideas of Edwin's, adapting also some suggestions of Helge's. A screenshot is attached. This separates out "Default" a bit, changes the label to "Default for Current Paragraph"---I think that makes it a little clearer to users what this does---and makes some space for adding "(Justifed)" without alignment issues. Something even better, in the non-multi-paragraph case, might be to make it say "Default for Standard" or "Default for Itemize" or whatever. But I think doing this will involve rather more work, as the extant controller doesn't provide access to this. There is one remaining issue, namely, that what the default is isn't indicated here, because I haven't had time to figure out how to determine if there is a multi-paragraph selection. And, fortunately, for me, I'm going on vacation for a week and a half on Thursday and am very unlikely to be able to do that before then. So I'm hoping someone else will finish that bit---Abdel, JMarc? The only thing that needs doing is to replace the silly: bool const isMultiParagraph = false; in QParagraphDialog::checkAlignmentRadioButtons() with something sensible. The other needed code is already there. Also, there are a couple "FIXME"s here that refer to the fact that LYX_ALIGN_LAYOUT isn't required to be a possible alignment. Obviously, it should be. The second patch I've attached makes this change---and another one, namely: Why should LYX_ALIGN_BLOCK be possible by default? No good reason, so far as I can see. With this, the two FIXMEs can be fixed (and I think a proper solution for some other bugs also comes into sight, but later). If anyone wants to sort this out, too, that'd be great. I can commit all of this later tonight if someone tells me how to deal with the multi-paragraph bit. Or someone can fix that and commit it for me. I don't care. Either way. Richard
Re: [PATCH] Reworking of Paragraph Settings Dialog
On Tuesday 26 June 2007 18:55:01 Edwin Leuven wrote: > perhaps this can make it into rc2? Nope. If there is a consensus about this patch I will consider it for post rc2. -- José Abílio
Re: [PATCH] Reworking of Paragraph Settings Dialog
Richard Heck wrote: changes the label to "Default for Current Paragraph"---I think that > makes it a little clearer to users what this does---and makes some > space for adding "(Justifed)" without alignment issues. May I suggest to name it Built-in Alignment for Current Paragraph (Justified) instead? If you don't like the word Built-in, then please make it Default Alignment for Current Paragraph (Justified) to make it *extra* clear what default we are talking about. There is room enough, according to the screen shot. Regards, Asger
Re: [PATCH] Reworking of Paragraph Settings Dialog
José Matos wrote: On Tuesday 26 June 2007 18:55:01 Edwin Leuven wrote: perhaps this can make it into rc2? Nope. If there is a consensus about this patch I will consider it for post rc2. i thought you established the consensus by your coin toss?
Re: [PATCH] Reworking of Paragraph Settings Dialog
On Tuesday 26 June 2007 19:08:56 Edwin Leuven wrote: > i thought you established the consensus by your coin toss? So that just means that I will toss the coin again, what is the problem? ;-) -- José Abílio
Re: [PATCH] Reworking of Paragraph Settings Dialog
José Matos wrote: On Tuesday 26 June 2007 19:08:56 Edwin Leuven wrote: i thought you established the consensus by your coin toss? So that just means that I will toss the coin again, what is the problem? ;-) none really, i just thought i noticed some inconsistency between this mail and a previous one. the sequential coin tossing explains a lot though... (your students must love your grading ;-)
Re: [PATCH] Reworking of Paragraph Settings Dialog
Asger Ottar Alstrup wrote: instead? If you don't like the word Built-in, then please make it Default Alignment for Current Paragraph (Justified) to make it *extra* clear what default we are talking about. There is room enough, according to the screen shot. or even more verbose: "Use this paragraph's default alignment (Justified)" (to make it more explicit that there is a paragraph specific default alignment)
Re: [PATCH] Reworking of Paragraph Settings Dialog
On Tue, Jun 26, 2007 at 08:38:01PM +0200, Edwin Leuven wrote: > José Matos wrote: > >On Tuesday 26 June 2007 19:08:56 Edwin Leuven wrote: > >>i thought you established the consensus by your coin toss? > > > >So that just means that I will toss the coin again, what is the problem? > >;-) > > none really, i just thought i noticed some inconsistency between this > mail and a previous one. > > the sequential coin tossing explains a lot though... > > (your students must love your grading ;-) As a lecturer one is supposed to be feared, not loved... Andre'
Re: [PATCH] Reworking of Paragraph Settings Dialog
Edwin Leuven wrote: Asger Ottar Alstrup wrote: instead? If you don't like the word Built-in, then please make it Default Alignment for Current Paragraph (Justified) to make it *extra* clear what default we are talking about. There is room enough, according to the screen shot. or even more verbose: "Use this paragraph's default alignment (Justified)" That's fine with me, though I'd suggest "the" instead of "this", as that is OK for the multi-paragraph case, too. 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
Re: [PATCH] Reworking of Paragraph Settings Dialog
Richard Heck wrote: > > "Use this paragraph's default alignment (Justified)" > > That's fine with me, though I'd suggest "the" instead of "this", as that > is OK for the multi-paragraph case, too. Oh no, please don't. Use tooltips for verbose hints (you can't imagine how long this label will be in the German translation). Jürgen