#include "LyXRC.h"
#include "debug.h"
+#include "Color.h"
#include "Converter.h"
#include "Format.h"
#include "gettext.h"
#include "Session.h"
-#include "Color.h"
#include "Lexer.h"
#include "Font.h"
#include "Mover.h"
{ "\\custom_export_command", LyXRC::RC_CUSTOM_EXPORT_COMMAND },
{ "\\custom_export_format", LyXRC::RC_CUSTOM_EXPORT_FORMAT },
{ "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
+ { "\\def_file", LyXRC::RC_DEFFILE },
{ "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE },
{ "\\default_papersize", LyXRC::RC_DEFAULT_PAPERSIZE },
{ "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
void LyXRC::setDefaults() {
bind_file = "cua";
+ def_file = "default";
ui_file = "default";
// Get printer from the environment. If fail, use default "",
// assuming that everything is set up correctly.
}
break;
+ case RC_DEFFILE:
+ if (lexrc.next()) {
+ def_file = os::internal_path(lexrc.getString());
+ }
+ break;
+
case RC_UIFILE:
if (lexrc.next()) {
ui_file = os::internal_path(lexrc.getString());
break;
}
- Color::color const col =
+ ColorCode const col =
lcolor.getFromLyXName(lyx_name);
- if (col == Color::none ||
- col == Color::inherit ||
- col == Color::ignore)
+ if (col == Color_none ||
+ col == Color_inherit ||
+ col == Color_ignore)
break;
if (!lcolor.setColor(col, x11_name)) {
LyXRCTags tag = RC_LAST;
if (!name.empty()) {
- for (size_t i = 0; i < lyxrcCount; ++i)
+ for (int i = 0; i != lyxrcCount; ++i)
if ("\\" + name == lyxrcTags[i].tag)
tag = static_cast<LyXRCTags>(lyxrcTags[i].code);
}
<< "### LyX, The Document Processor\n"
<< "###\n"
<< "### Copyright 1995 Matthias Ettrich\n"
- << "### Copyright 1995-2001 The LyX Team.\n"
+ << "### Copyright 1995-2007 The LyX Team.\n"
<< "###\n"
<< "### ========================================================\n"
<< "\n"
if (tag != RC_LAST)
break;
+ case RC_DEFFILE:
+ if (ignore_system_lyxrc ||
+ def_file != system_lyxrc.def_file) {
+ string const path = os::external_path(def_file);
+ os << "\\def_file \"" << path << "\"\n";
+ }
+ if (tag != RC_LAST)
+ break;
+
//
// Misc Section
//
<< "#\n\n";
case RC_SET_COLOR:
- for (int i = 0; i < Color::ignore; ++i) {
- Color::color lc = static_cast<Color::color>(i);
+ for (int i = 0; i < Color_ignore; ++i) {
+ ColorCode lc = static_cast<ColorCode>(i);
string const col(lcolor.getX11Name(lc));
if (ignore_system_lyxrc ||