On Wed, Nov 02, 2005 at 12:51:38PM +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> OK, that's easy. There is an LColor::red in insetcharstyle
> Martin> too; shall I change it as well?
> 
> Yes, please.
> 
> JMarc

It looks like this then. OK to commit?

- Martin

Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.1197
diff -u -p -r1.1197 ChangeLog
--- ChangeLog   25 Oct 2005 15:21:48 -0000      1.1197
+++ ChangeLog   2 Nov 2005 13:04:51 -0000
@@ -1,3 +1,9 @@
+2005-11-02  Martin Vermeer  <[EMAIL PROTECTED]>
+
+       * insetbranch.C: partial fix bug 2092: branches not 
+       propagated to child docs
+       * insetcharstyle.C: Also replace LColor::red by LColor::error
+
 2005-10-25  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
        * insetbranch.C (isBranchSelected): take a buffer as argument.
Index: insetbranch.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetbranch.C,v
retrieving revision 1.58
diff -u -p -r1.58 insetbranch.C
--- insetbranch.C       25 Oct 2005 15:21:49 -0000      1.58
+++ insetbranch.C       2 Nov 2005 13:04:51 -0000
@@ -95,12 +95,17 @@ void InsetBranch::setButtonLabel()
        font.decSize();
 
        string s = _("Branch: ") + params_.branch;
-       setLabel(isOpen() ? s : getNewLabel(s) );
        font.setColor(LColor::foreground);
-       if (!params_.branch.empty())
-               setBackgroundColor(lcolor.getFromLyXName(params_.branch));
-       else
+       if (!params_.branch.empty()) {
+               LColor_color c = lcolor.getFromLyXName(params_.branch);
+               if (c == LColor::none) {
+                       c = LColor::error;
+                       s = _("Undef: ") + s;
+               }
+               setBackgroundColor(c);
+       } else
                setBackgroundColor(LColor::background);
+       setLabel(isOpen() ? s : getNewLabel(s) );
        setLabelFont(font);
 }
 
Index: insetcharstyle.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcharstyle.C,v
retrieving revision 1.37
diff -u -p -r1.37 insetcharstyle.C
--- insetcharstyle.C    6 Sep 2005 16:27:24 -0000       1.37
+++ insetcharstyle.C    2 Nov 2005 13:04:51 -0000
@@ -97,7 +97,7 @@ void InsetCharStyle::setUndefined()
        params_.latexparam.clear();
        params_.font = LyXFont(LyXFont::ALL_INHERIT);
        params_.labelfont = LyXFont(LyXFont::ALL_INHERIT);
-       params_.labelfont.setColor(LColor::red);
+       params_.labelfont.setColor(LColor::error);
 }
 
 

Attachment: pgphPKPhbnk99.pgp
Description: PGP signature

Reply via email to