]> git.lyx.org Git - features.git/commitdiff
* src/lyx_main.C (readRcFile): do not report an error if file is not
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 2 May 2006 12:53:48 +0000 (12:53 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 2 May 2006 12:53:48 +0000 (12:53 +0000)
found.
(init): read lyxrc.dist before lyxrc.defaults; remove code to read
lyxrc (LyX 1.1.5 compatibility code).

* src/encoding.C (read):
* src/language.C (read): set debug to the INFO channel.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13788 a592a061-630c-0410-9148-cb99ea01b6c8

src/encoding.C
src/language.C
src/lyx_main.C

index 045a44e2543a271d8c97e10204efb90499780717..96182834e4e3e986668acffd0067c7301d028551 100644 (file)
@@ -336,7 +336,7 @@ void Encodings::read(string const & filename)
                        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();
index 34e08854199483f00fa1aa0e91c99b50a7f7eb12..c656f22992fd1a78a883ba0fe5c5387a57264e32 100644 (file)
@@ -54,7 +54,7 @@ void Languages::read(string const & filename)
                        lang = lex.getString();
                else
                        break;
-               lyxerr[Debug::INIT] << "Reading language " << lang << endl;
+               lyxerr[Debug::INFO] << "Reading language " << lang << endl;
 
                if (lex.next())
                        babel = lex.getString();
index c847f75c24157b47eb148b1ae63797b2c4e4684a..cfe98b1a4413c594a867f067fed70aeba5d0fdfa 100644 (file)
@@ -440,19 +440,19 @@ void LyX::init(bool gui)
        // 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");
@@ -666,19 +666,18 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
 
 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);
 }