RC_SCREEN_FONT_POPUP,
RC_SCREEN_FONT_ENCODING,
RC_SCREEN_FONT_ENCODING_MENU,
+ RC_SET_COLOR,
RC_AUTOSAVE,
RC_DOCUMENTPATH,
RC_TEMPLATEPATH,
{ "\\screen_font_typewriter", RC_SCREEN_FONT_TYPEWRITER },
{ "\\screen_zoom", RC_SCREEN_ZOOM },
{ "\\serverpipe", RC_SERVERPIPE },
+ { "\\set_color", RC_SET_COLOR },
{ "\\show_banner", RC_SHOW_BANNER },
{ "\\spell_command", RC_SPELL_COMMAND },
{ "\\tempdir_path", RC_TEMPDIRPATH },
override_x_deadkeys = true;
autosave = 300;
auto_region_delete = true;
- ascii_linelen = 75;
+ ascii_linelen = 65;
num_lastfiles = 4;
check_lastfiles = true;
make_backup = true;
break;
case RC_BINDFILE: // RVDK_PATCH_5
if (lexrc.next()) {
- ReadBindFile(lexrc.GetString());
+ string tmp(lexrc.GetString());
+ if (bind_file.empty()) {
+ // we only need the name of the first
+ // bind file since that (usually)
+ // includes several others.
+ bind_file = tmp;
+ }
+ ReadBindFile(tmp);
}
break;
break;
case RC_KBMAP_PRIMARY:
- if (lexrc.next())
- primary_kbmap = lexrc.GetString();
+ if (lexrc.next())
+ if (!LibFileSearch("kbd", lexrc.GetString(),
+ "kmap").empty())
+ primary_kbmap = lexrc.GetString();
+ else
+ lexrc.printError("LyX: Keymap `$$Token' not found");
break;
case RC_KBMAP_SECONDARY:
- if (lexrc.next())
- secondary_kbmap = lexrc.GetString();
+ if (lexrc.next())
+ if (!LibFileSearch("kbd", lexrc.GetString(),
+ "kmap").empty())
+ secondary_kbmap = lexrc.GetString();
+ else
+ lexrc.printError("LyX: Keymap `$$Token' not found");
break;
case RC_FONT_ENCODING:
font_norm_menu = lexrc.GetString();
break;
+ case RC_SET_COLOR:
+ {
+ string lyx_name, x11_name;
+
+ if (lexrc.lex() == LyXLex::LEX_DATA) {
+ lyx_name = lexrc.GetString();
+ } else {
+ lexrc.printError("Bad color tag: `$$Token'");
+ break;
+ }
+
+ if (lexrc.lex() == LyXLex::LEX_DATA) {
+ x11_name = lexrc.GetString();
+ } else {
+ lexrc.printError("Bad color name: `$$Token'");
+ break;
+ }
+
+ if (!lcolor.setColor(lyx_name, x11_name))
+ lyxerr << "Bad lyxrc set_color for "
+ << lyx_name << endl;
+
+ break;
+ }
case RC_AUTOREGIONDELETE:
// Auto region delete defaults to true
if (lexrc.next())
// we should not do an explicit binding before
// loading a bind file. So, in this case, load
// the default bind file.
- if (!hasBindFile)
+ if (!hasBindFile) {
ReadBindFile();
-
+ bind_file = bindFile;
+ }
// !!!chb, dynamic key binding...
int action, res = 0;
string seq, cmd;
if ( lexrc.next())
docbook_to_pdf_command = lexrc.GetString();
break;
+
case RC_LAST: break; // this is just a dummy
}
}
// bind files are not done here.
case RC_BEGINTOOLBAR:
// Toolbar is not written here (yet).
+ //case RC_SET_COLOR:
+ // color bindings not written to preference file.
+ // And we want to be warned about that. (Lgb)
case RC_FONT_ENCODING:
os << "\\font_encoding \"" << fontenc << "\"\n";
case RC_PRINTER:
case RC_RTL_SUPPORT:
os << "\\rtl " << tostr(rtl_support) << "\n";
case RC_AUTO_NUMBER:
- os << "\\auto_number" << tostr(auto_number) << "\n";
+ os << "\\auto_number " << tostr(auto_number) << "\n";
case RC_MARK_FOREIGN_LANGUAGE:
os << "\\mark_foreign_language " <<
tostr(mark_foreign_language) << "\n";
case RC_MAKE_BACKUP:
os << "\\make_backup " << tostr(make_backup) << "\n";
case RC_BACKUPDIR_PATH:
- os << "\\backupdir_path" << backupdir_path << "\n";
+ os << "\\backupdir_path \"" << backupdir_path << "\"\n";
case RC_DATE_INSERT_FORMAT:
os << "\\date_insert_format \"" << date_insert_format
<< "\"\n";