string const name = lex.getString();
lex.next();
string const latexname = lex.getString();
- lyxerr[Debug::INIT] << "Reading encoding " << name << endl;
+ lyxerr[Debug::INFO] << "Reading encoding " << name << endl;
Uchar table[256];
for (unsigned int i = 0; i < 256; ++i) {
lex.next();
// Read configuration files
//
+ // This one may have been distributed along with LyX.
+ readRcFile("lyxrc.dist");
+ // This one is generated in user_support directory by lib/configure.py.
readRcFile("lyxrc.defaults");
+
system_lyxrc = lyxrc;
system_formats = formats;
system_converters = converters;
system_movers = movers;
system_lcolor = lcolor;
- string prefsfile = "preferences";
- // back compatibility to lyxs < 1.1.6
- if (libFileSearch(string(), prefsfile).empty())
- prefsfile = "lyxrc";
- if (!libFileSearch(string(), prefsfile).empty())
- readRcFile(prefsfile);
+ // This one is edited through the preferences dialog.
+ readRcFile("preferences");
readEncodingsFile("encodings");
readLanguagesFile("languages");
void LyX::readRcFile(string const & name)
{
- lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
+ lyxerr[Debug::INIT] << "About to read " << name << "... ";
string const lyxrc_path = libFileSearch(string(), name);
if (!lyxrc_path.empty()) {
- lyxerr[Debug::INIT] << "Found " << name
- << " in " << lyxrc_path << endl;
+ lyxerr[Debug::INIT] << "Found in " << lyxrc_path << endl;
- if (lyxrc.read(lyxrc_path) >= 0)
- return;
- }
+ if (lyxrc.read(lyxrc_path) < 0)
+ showFileError(name);
+ } else
+ lyxerr[Debug::INIT] << "Not found." << lyxrc_path << endl;
- showFileError(name);
}