John Levon wrote:
> On Sun, Aug 25, 2002 at 09:23:22AM +0900, Rob Lahaye wrote:
> 
>>Ok. follow patch comes soon, hopefully with the above mentioned 
>>displayTranslator included :).
> 
> thanks

John,

This "follow-up" patch deals with most, if not all, of your suggestions
to my graphics patch, applied earlier.

And there is more:

1) You must add a new file to CVS: src/graphics/GraphicsTypes.C.

2) This patch also includes Dekel's patch to lyx2lyx conversion
    from old to new graphics format. See what he wrote in:
      http://marc.theaimsgroup.com/?l=lyx-devel&m=103019206311966&w=2

Regards,
Rob.

Attachment: FollowUp_NewGraphicsDialog.diff.gz
Description: application/gzip

// -*- C++ -*-
/**
 *  \file GraphicsTypes.C
 *  Copyright 2002 the LyX Team
 *  Read the file COPYING
 */

#include "graphics/GraphicsTypes.h"

namespace grfx {

/// The translator between the Display enum and corresponding lyx string.
Translator< DisplayType, string > displayTranslator(DefaultDisplay, "default");

void setDisplayTranslator()
{
        /// This variable keeps a tab on whether the translator is set.
        static bool done = false;

        if (!done) {
                done = true;

                // Fill the display translator
                displayTranslator.addPair(DefaultDisplay, "default");
                displayTranslator.addPair(MonochromeDisplay, "monochrome");
                displayTranslator.addPair(GrayscaleDisplay, "grayscale");
                displayTranslator.addPair(ColorDisplay, "color");
                displayTranslator.addPair(NoDisplay, "none");
                
                // backward compatibility for old lyxrc.display_graphics
                displayTranslator.addPair(MonochromeDisplay, "mono");
                displayTranslator.addPair(GrayscaleDisplay, "gray");
                displayTranslator.addPair(NoDisplay, "no");
        }
}

} // namespace grfx

Reply via email to