LyX needs a standard layout in all text classes for things like ERT. g-brief does not have one (http://bugzilla.lyx.org/show_bug.cgi?id=2026).
The attached patch is one solution (which I would prefer), others are described in bugzilla. Which solution should we choose? Georg
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2345 diff -u -p -r1.2345 ChangeLog --- src/ChangeLog 23 Dec 2005 12:19:56 -0000 1.2345 +++ src/ChangeLog 28 Dec 2005 14:57:15 -0000 @@ -1,3 +1,8 @@ +2005-12-28 Georg Baum <[EMAIL PROTECTED]> + + * lyxtextclass.C (Read): Make sure that we have a standard layout + (bug 2026) + 2005-12-22 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * lyxfunc.C (dispatch): do not call getStatus again to determine Index: src/lyxtextclass.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtextclass.C,v retrieving revision 1.52 diff -u -p -r1.52 lyxtextclass.C --- src/lyxtextclass.C 2 Nov 2005 20:11:35 -0000 1.52 +++ src/lyxtextclass.C 28 Dec 2005 14:57:16 -0000 @@ -475,6 +475,13 @@ bool LyXTextClass::Read(string const & f << MakeDisplayPath(filename) << endl; + // Every textclass needs a standard layout + if (!hasLayout("Standard")) { + boost::shared_ptr<LyXLayout> lay(new LyXLayout); + lay->setName("Standard"); + layoutlist_.push_back(lay); + } + return error; }