#include "converter.h"
#include "language.h"
#include "support/os.h"
+// for NO_LATEX
+#if 1
+#include "lyxfont.h"
+#endif
using std::endl;
last_loaded = bufferlist.newFile("tmpfile", string());
// try to dispatch to last loaded buffer first
- bool dispatched = last_loaded->Dispatch(batch_command);
+ bool dispatched = last_loaded->dispatch(batch_command);
// if this was successful, return.
// Maybe we could do something more clever than aborting...
// otherwise, let the GUI handle the batch command
lyxGUI->regBuf(last_loaded);
- lyxGUI->getLyXView()->getLyXFunc()->Dispatch(batch_command);
+ lyxGUI->getLyXView()->getLyXFunc()->dispatch(batch_command);
// fall through...
}
<<_("set the environment variable LYX_DIR_11x to the "
"LyX system directory ")
<< _("containing the file `chkconfig.ltx'.") << endl;
- if (!path_shown)
+ if (!path_shown) {
+ FileInfo fi(LYX_DIR);
+ if (!fi.exist()) {
+ lyxerr << "Couldn't even find the default LYX_DIR." << endl
+ << "Giving up." << endl;
+ exit(1);
+ }
lyxerr << _("Using built-in default ")
<< LYX_DIR << _(" but expect problems.")
<< endl;
- else
+ } else {
lyxerr << _("Expect problems.") << endl;
+ }
system_lyxdir = LYX_DIR;
path_shown = true;
}
// Read configuration files
//
- ReadRcFile("lyxrc.defaults");
+ readRcFile("lyxrc.defaults");
system_lyxrc = lyxrc;
system_formats = formats;
system_converters = converters;
// If there is a preferences file we read that instead
// of the old lyxrc file.
- if (!ReadRcFile("preferences"))
- ReadRcFile("lyxrc");
+ if (!readRcFile("preferences"))
+ readRcFile("lyxrc");
// Read encodings
- ReadEncodingsFile("encodings");
+ readEncodingsFile("encodings");
// Read languages
- ReadLanguagesFile("languages");
+ readLanguagesFile("languages");
// Load the layouts
lyxerr[Debug::INIT] << "Reading layouts..." << endl;
lyxrc.readBindFileIfNeeded();
// Read menus
- ReadUIFile(lyxrc.ui_file);
+ readUIFile(lyxrc.ui_file);
// Bind the X dead keys to the corresponding LyX functions if
// necessary.
// Read the rc file `name'
-bool LyX::ReadRcFile(string const & name)
+bool LyX::readRcFile(string const & name)
{
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
// Read the ui file `name'
-void LyX::ReadUIFile(string const & name)
+void LyX::readUIFile(string const & name)
{
enum Uitags {
ui_menuset = 1,
// Read the languages file `name'
-void LyX::ReadLanguagesFile(string const & name)
+void LyX::readLanguagesFile(string const & name)
{
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
// Read the encodings file `name'
-void LyX::ReadEncodingsFile(string const & name)
+void LyX::readEncodingsFile(string const & name)
{
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;