On Fri, Apr 29, 2005 at 06:52:17PM +0200, Georg Baum wrote:
> Martin Vermeer wrote:
> 
> > +        case LFUN_INSERT_MATH: {
> > +                bool const textarg = 
> > +                        arg == "\\textbf"   || arg == "\\textsf" ||
> > +                        arg == "\\textrm"   || arg == "\\textmd" ||
> > +                        arg == "\\textit"   || arg == "\\textsc" ||
> > +                        arg == "\\textsl"   || arg == "\\textup" ||
> > +                        arg == "\\texttt"   || arg == "\\textbb" ||
> > +                        arg == "\\textnormal";
> > +                flag.enabled(currentMode() == MATH_MODE && !textarg
> > +                        ||   currentMode() == TEXT_MODE && textarg);
> 
> I think this should be
> 
> +                flag.enabled((currentMode() == MATH_MODE && !textarg)
> +                        ||   (currentMode() == TEXT_MODE && textarg));
> 
> 
> > +                break;
> > +        }
> > +        case LFUN_INSERT_MATRIX:
> > +                flag.enabled(currentMode() == MATH_MODE);
> > +                break;
> > +        case LFUN_MATH_MODE:
> > +                // i.e., "math-mode on" gets through in text mode
> > +                flag.enabled(currentMode() == MATH_MODE || !arg.empty());
> 
> What does this do?

The only purpose is to make the menu entry "Text box" (a new one)
display grey when inside a math mbox, being unavailable... without at
the same time also greying out the several unrelated menu items
containing "math-mode on". 

> Apart from this and the .ui file change this looks entirely reasonable to
> me: big improvement with little changes.
> 
> 
> Georg

- Martin

Attachment: pgpTIZidVOa3Z.pgp
Description: PGP signature

Reply via email to