On Tue, Oct 02, 2007 at 05:35:33PM +0200, Andre Poenitz wrote:
> On Tue, Oct 02, 2007 at 06:03:15PM +0300, Martin Vermeer wrote:
> > On Tue, 02 Oct 2007 16:09:12 +0200 Jean-Marc Lasgouttes
> > <[EMAIL PROTECTED]> wrote:
> > 
> > > Martin Vermeer <[EMAIL PROTECTED]> writes:
> > > 
> > > > Yes, I understand that. Two different things.
> > > 
> > > I know you do.
> > > 
> > > > And I would maintain that this is a _perceived_ non-readiness
> > > > mostly -- to people that are 'indoctrinated' by the font attribute
> > > > way of doing things. 
> > > 
> > > The example of colors in mathed is a good one. One should not have
> > > to dissolve the color inset and then insert a new one to change
> > > color.
> > 
> > But we don't even have a GUI for this (do we?) That would be a higher
> > priority at this point.
> 
> Yes. And I can tell you even why we don't have a Gui for antyhing in
> math (except fot the panels/toolbar) ...
> 
> Andre'

Well, the attached patch enables inset dissolving in mathed. (I'm sure 
I overlooked all kinds of things.)

It would be trivial to put the insertion of the most popular colour into
mathed on the menu tree.

- Martin

Index: InsetMathNest.cpp
===================================================================
--- InsetMathNest.cpp	(revision 20634)
+++ InsetMathNest.cpp	(working copy)
@@ -1003,7 +1003,9 @@
 			cur.undispatched();
 		break;
 	}
-
+	case LFUN_INSET_DISSOLVE:
+		if (!cur[(cur.depth() - 2)].text())
+			cur.pullArg();
 	default:
 		InsetMath::doDispatch(cur, cmd);
 		break;
@@ -1112,6 +1114,10 @@
 		flag.enabled(false);
 		break;
 
+	case LFUN_INSET_DISSOLVE:
+		flag.enabled(!cur[(cur.depth() - 2)].text());
+		break;
+
 	default:
 		ret = false;
 		break;

Reply via email to