Angus Leeming wrote: > Oh, if the file is meant to change only at predetermined times, then a > single line added to lyx_cb.C's Reconfigure would do the trick: > > LatexFeatures::getAvailable(); > > no? > > But you're probably right. Not worth it. At the moment.
I did it nevertheless. Patch attached. If no one objects, I will commit this. Jürgen
Index: LaTeXFeatures.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LaTeXFeatures.C,v retrieving revision 1.116 diff -u -r1.116 LaTeXFeatures.C --- LaTeXFeatures.C 24 Jan 2005 17:12:18 -0000 1.116 +++ LaTeXFeatures.C 27 Jan 2005 16:02:20 -0000 @@ -84,6 +84,11 @@ if (!lex.isOK()) return; + // This is necessary for lyx_cb.C's reconfigure + // (some packages might have been removed) + if (!packages_.empty()) + packages_.clear(); + bool finished = false; // Parse config-file while (lex.isOK() && !finished) { Index: lyx_cb.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_cb.C,v retrieving revision 1.245 diff -u -r1.245 lyx_cb.C --- lyx_cb.C 10 Jan 2005 19:17:39 -0000 1.245 +++ lyx_cb.C 27 Jan 2005 16:02:21 -0000 @@ -23,6 +23,7 @@ #include "debug.h" #include "gettext.h" #include "lastfiles.h" +#include "LaTeXFeatures.h" #include "lyx_main.h" #include "lyxlayout.h" #include "lyxrc.h" @@ -449,6 +450,8 @@ p.pop(); bv->owner()->message(_("Reloading configuration...")); lyxrc.read(LibFileSearch(string(), "lyxrc.defaults")); + // Re-read packages.lst + LaTeXFeatures::getAvailable(); Alert::information(_("System reconfigured"), _("The system has been reconfigured.\n"