X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXRC.cpp;h=7cfa2a3445b1924f0ff547e206ddfbf566325b63;hb=55bc36587210575f9ef0df3b101f18161469c22b;hp=34998f2b63ff1d5796eaae90fa1fe1915e5920c2;hpb=34943a4e5f2202e71029865f3a51ab985662423f;p=lyx.git diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 34998f2b63..7cfa2a3445 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -59,7 +59,7 @@ namespace { // The format should also be updated in configure.py, and conversion code // should be added to prefs2prefs_prefs.py. -static unsigned int const LYXRC_FILEFORMAT = 21; // spitz: jbibtex_alternatives +static unsigned int const LYXRC_FILEFORMAT = 24; // spitz: rename collapsible // when adding something to this array keep it sorted! LexerKeyword lyxrcTags[] = { @@ -98,6 +98,7 @@ LexerKeyword lyxrcTags[] = { { "\\default_decimal_point", LyXRC::RC_DEFAULT_DECIMAL_POINT }, { "\\default_length_unit", LyXRC::RC_DEFAULT_LENGTH_UNIT }, { "\\default_otf_view_format", LyXRC::RC_DEFAULT_OTF_VIEW_FORMAT }, + { "\\default_platex_view_format", LyXRC::RC_DEFAULT_PLATEX_VIEW_FORMAT }, { "\\default_view_format", LyXRC::RC_DEFAULT_VIEW_FORMAT }, { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN }, { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS }, @@ -158,6 +159,7 @@ LexerKeyword lyxrcTags[] = { { "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG }, { "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG }, { "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG }, + { "\\pygmentize_command", LyXRC::RC_PYGMENTIZE_COMMAND }, { "\\save_compressed", LyXRC::RC_SAVE_COMPRESSED }, { "\\save_origin", LyXRC::RC_SAVE_ORIGIN }, { "\\screen_dpi", LyXRC::RC_SCREEN_DPI }, @@ -211,7 +213,7 @@ LexerKeyword lyxrcTags[] = { const int lyxrcCount = sizeof(lyxrcTags) / sizeof(lyxrcTags[0]); -} // namespace anon +} // namespace LyXRC::LyXRC() @@ -236,14 +238,17 @@ void LyXRC::setDefaults() view_dvi_paper_option.erase(); default_view_format = "pdf2"; default_otf_view_format = "pdf4"; + default_platex_view_format = "pdf3"; chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38"; bibtex_command = "automatic"; fontenc = "default"; index_command = "makeindex -c -q"; nomencl_command = "makeindex -s nomencl.ist"; + pygmentize_command = string(); dpi = 75; // Because a screen is typically wider than a piece of paper: - zoom = 150; + defaultZoom = 150; + currentZoom = defaultZoom; allow_geometry_session = true; // Default LaTeX font size: font_sizes[FONT_SIZE_TINY] = "5.0"; @@ -374,7 +379,7 @@ void oldFontFormat(string & family, string & foundry) foundry.erase(); } -} // namespace anon +} // namespace bool LyXRC::read(FileName const & filename, bool check_format) @@ -457,7 +462,7 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) FileName const tmp = libFileSearch(string(), lexrc.getString()); - if (read(tmp, check_format)) { + if (!read(tmp, check_format)) { lexrc.printError( "Error reading included file: " + tmp.absFileName()); } @@ -543,6 +548,12 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) lexrc >> print_paper_flag; break; + case RC_PYGMENTIZE_COMMAND: + if (lexrc.next(true)) { + pygmentize_command = lexrc.getString(); + } + break; + case RC_VIEWDVI_PAPEROPTION: if (lexrc.next()) view_dvi_paper_option = lexrc.getString(); @@ -615,9 +626,9 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) break; case RC_SCREEN_ZOOM: - lexrc >> zoom; - if (zoom < 10) - zoom = 10; + lexrc >> defaultZoom; + if (defaultZoom < 10) + defaultZoom = 10; break; case RC_GEOMETRY_SESSION: @@ -994,7 +1005,7 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) case RC_VIEWER: { string format, command; lexrc >> format >> command; - formats.setViewer(format, command); + theFormats().setViewer(format, command); break; } case RC_FILEFORMAT: { @@ -1045,9 +1056,9 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) if (theConverters().formatIsUsed(format)) LYXERR0("Can't delete format " << format); else - formats.erase(format); + theFormats().erase(format); } else { - formats.add(format, extensions, prettyname, + theFormats().add(format, extensions, prettyname, shortcut, viewer, editor, mime, flgs); } break; @@ -1073,6 +1084,10 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) lexrc >> default_otf_view_format; break; + case RC_DEFAULT_PLATEX_VIEW_FORMAT: + lexrc >> default_platex_view_format; + break; + case RC_DEFAULT_VIEW_FORMAT: lexrc >> default_view_format; break; @@ -1227,7 +1242,7 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) } /// Update converters data-structures - theConverters().update(formats); + theConverters().update(theFormats()); theConverters().buildGraph(); theBufferList().invalidateConverterCache(); @@ -1278,7 +1293,7 @@ namespace { "\"", "\\\""); } -} +} // namespace void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const @@ -1315,7 +1330,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_DEFFILE: if (ignore_system_lyxrc || def_file != system_lyxrc.def_file) { @@ -1332,7 +1347,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# MISC SECTION ######################################\n" << "#\n\n"; // bind files are not done here. - + // fall through case RC_PATH_PREFIX: if (ignore_system_lyxrc || path_prefix != system_lyxrc.path_prefix) { @@ -1340,6 +1355,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_UIFILE: if (ignore_system_lyxrc || ui_file != system_lyxrc.ui_file) { @@ -1348,6 +1364,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_AUTOREGIONDELETE: if (ignore_system_lyxrc || auto_region_delete != system_lyxrc.auto_region_delete) { @@ -1358,6 +1375,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_AUTORESET_OPTIONS: if (ignore_system_lyxrc || auto_reset_options != system_lyxrc.auto_reset_options) { @@ -1369,6 +1387,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_AUTOSAVE: if (ignore_system_lyxrc || autosave != system_lyxrc.autosave) { @@ -1377,6 +1396,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_DISPLAY_GRAPHICS: if (ignore_system_lyxrc || display_graphics != system_lyxrc.display_graphics) { @@ -1388,6 +1408,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SORT_LAYOUTS: if (ignore_system_lyxrc || sort_layouts != system_lyxrc.sort_layouts) { @@ -1396,6 +1417,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_GROUP_LAYOUTS: if (ignore_system_lyxrc || group_layouts != system_lyxrc.group_layouts) { @@ -1404,6 +1426,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_VIEWDVI_PAPEROPTION: if (ignore_system_lyxrc || view_dvi_paper_option @@ -1415,6 +1438,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_CHKTEX_COMMAND: if (ignore_system_lyxrc || chktex_command != system_lyxrc.chktex_command) { @@ -1422,6 +1446,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_BIBTEX_ALTERNATIVES: { CommandSet::const_iterator it = bibtex_alternatives.begin(); CommandSet::const_iterator end = bibtex_alternatives.end(); @@ -1434,6 +1459,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c if (tag != RC_LAST) break; } + // fall through case RC_BIBTEX_COMMAND: if (ignore_system_lyxrc || bibtex_command != system_lyxrc.bibtex_command) { @@ -1441,6 +1467,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_JBIBTEX_COMMAND: if (ignore_system_lyxrc || jbibtex_command != system_lyxrc.jbibtex_command) { @@ -1448,6 +1475,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_JBIBTEX_ALTERNATIVES: { CommandSet::const_iterator it = jbibtex_alternatives.begin(); CommandSet::const_iterator end = jbibtex_alternatives.end(); @@ -1460,6 +1488,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c if (tag != RC_LAST) break; } + // fall through case RC_INDEX_ALTERNATIVES: { CommandSet::const_iterator it = index_alternatives.begin(); CommandSet::const_iterator end = index_alternatives.end(); @@ -1472,6 +1501,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c if (tag != RC_LAST) break; } + // fall through case RC_INDEX_COMMAND: if (ignore_system_lyxrc || index_command != system_lyxrc.index_command) { @@ -1479,6 +1509,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_JINDEX_COMMAND: if (ignore_system_lyxrc || jindex_command != system_lyxrc.jindex_command) { @@ -1486,6 +1517,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SPLITINDEX_COMMAND: if (ignore_system_lyxrc || splitindex_command != system_lyxrc.splitindex_command) { @@ -1493,6 +1525,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_NOMENCL_COMMAND: if (ignore_system_lyxrc || nomencl_command != system_lyxrc.nomencl_command) { @@ -1500,6 +1533,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through + case RC_PYGMENTIZE_COMMAND: + if (ignore_system_lyxrc || + pygmentize_command != system_lyxrc.pygmentize_command) { + os << "\\pygmentize_command \"" << escapeCommand(pygmentize_command) << "\"\n"; + } + if (tag != RC_LAST) + break; + // fall through case RC_TEX_EXPECTS_WINDOWS_PATHS: // Don't write this setting to the preferences file, // but allow temporary changes (bug 7557). @@ -1509,6 +1551,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_TEX_ALLOWS_SPACES: if (tex_allows_spaces != system_lyxrc.tex_allows_spaces) { os << "\\tex_allows_spaces " @@ -1516,6 +1559,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_KBMAP: if (ignore_system_lyxrc || use_kbmap != system_lyxrc.use_kbmap) { @@ -1523,6 +1567,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_KBMAP_PRIMARY: if (ignore_system_lyxrc || primary_kbmap != system_lyxrc.primary_kbmap) { @@ -1531,6 +1576,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_KBMAP_SECONDARY: if (ignore_system_lyxrc || secondary_kbmap != system_lyxrc.secondary_kbmap) { @@ -1539,6 +1585,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SERVERPIPE: if (ignore_system_lyxrc || lyxpipes != system_lyxrc.lyxpipes) { @@ -1547,6 +1594,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_DATE_INSERT_FORMAT: if (ignore_system_lyxrc || date_insert_format != system_lyxrc.date_insert_format) { @@ -1555,17 +1603,17 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_USER_NAME: os << "\\user_name \"" << user_name << "\"\n"; if (tag != RC_LAST) break; - + // fall through case RC_USER_EMAIL: os << "\\user_email \"" << user_email << "\"\n"; if (tag != RC_LAST) break; - + // fall through case RC_SHOW_BANNER: if (ignore_system_lyxrc || show_banner != system_lyxrc.show_banner) { @@ -1573,7 +1621,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_PREVIEW: if (ignore_system_lyxrc || preview != system_lyxrc.preview) { @@ -1593,7 +1641,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_PREVIEW_HASHED_LABELS: if (ignore_system_lyxrc || preview_hashed_labels != @@ -1603,7 +1651,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_PREVIEW_SCALE_FACTOR: if (ignore_system_lyxrc || preview_scale_factor != system_lyxrc.preview_scale_factor) { @@ -1612,7 +1660,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_USE_CONVERTER_CACHE: if (ignore_system_lyxrc || use_converter_cache != system_lyxrc.use_converter_cache) { @@ -1621,7 +1669,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN: if (ignore_system_lyxrc || use_converter_needauth_forbidden != system_lyxrc.use_converter_needauth_forbidden) { @@ -1630,7 +1678,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_USE_CONVERTER_NEEDAUTH: if (ignore_system_lyxrc || use_converter_needauth != system_lyxrc.use_converter_needauth) { @@ -1639,7 +1687,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_CONVERTER_CACHE_MAXAGE: if (ignore_system_lyxrc || converter_cache_maxage != system_lyxrc.converter_cache_maxage) { @@ -1652,7 +1700,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c os << "\n#\n" << "# SCREEN & FONTS SECTION ############################\n" << "#\n\n"; - + // fall through case RC_ICON_SET: if (ignore_system_lyxrc || icon_set != system_lyxrc.icon_set) { @@ -1661,7 +1709,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_USE_SYSTEM_THEME_ICONS: if (ignore_system_lyxrc || use_system_theme_icons != system_lyxrc.use_system_theme_icons) { @@ -1671,7 +1719,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_SCREEN_DPI: if (ignore_system_lyxrc || dpi != system_lyxrc.dpi) { @@ -1679,13 +1727,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_ZOOM: if (ignore_system_lyxrc || - zoom != system_lyxrc.zoom) { - os << "\\screen_zoom " << zoom << '\n'; + defaultZoom != system_lyxrc.defaultZoom) { + os << "\\screen_zoom " << defaultZoom << '\n'; } if (tag != RC_LAST) break; + // fall through case RC_GEOMETRY_SESSION: if (ignore_system_lyxrc || allow_geometry_session != system_lyxrc.allow_geometry_session) { @@ -1694,6 +1744,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_CURSOR_FOLLOWS_SCROLLBAR: if (ignore_system_lyxrc || cursor_follows_scrollbar @@ -1703,6 +1754,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_CURSOR_WIDTH: if (ignore_system_lyxrc || cursor_width @@ -1712,6 +1764,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCROLL_BELOW_DOCUMENT: if (ignore_system_lyxrc || scroll_below_document @@ -1721,6 +1774,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_PARAGRAPH_MARKERS: if (ignore_system_lyxrc || paragraph_markers @@ -1730,6 +1784,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_MAC_DONTSWAP_CTRL_META: if (ignore_system_lyxrc || mac_dontswap_ctrl_meta @@ -1739,6 +1794,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_MAC_LIKE_CURSOR_MOVEMENT: if (ignore_system_lyxrc || mac_like_cursor_movement @@ -1748,6 +1804,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_MACRO_EDIT_STYLE: if (ignore_system_lyxrc || macro_edit_style @@ -1761,6 +1818,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_DIALOGS_ICONIFY_WITH_MAIN: if (ignore_system_lyxrc || dialogs_iconify_with_main @@ -1770,6 +1828,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_FONT_ROMAN: if (ignore_system_lyxrc || roman_font_name != system_lyxrc.roman_font_name) { @@ -1778,6 +1837,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_FONT_ROMAN_FOUNDRY: if (ignore_system_lyxrc || roman_font_foundry != system_lyxrc.roman_font_foundry) { @@ -1786,6 +1846,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_FONT_SANS: if (ignore_system_lyxrc || sans_font_name != system_lyxrc.sans_font_name) { @@ -1794,6 +1855,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_FONT_SANS_FOUNDRY: if (ignore_system_lyxrc || sans_font_foundry != system_lyxrc.sans_font_foundry) { @@ -1802,6 +1864,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_FONT_TYPEWRITER: if (ignore_system_lyxrc || typewriter_font_name != system_lyxrc.typewriter_font_name) { @@ -1810,6 +1873,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_FONT_TYPEWRITER_FOUNDRY: if (ignore_system_lyxrc || typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) { @@ -1818,7 +1882,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_SCREEN_FONT_SCALABLE: if (ignore_system_lyxrc || use_scalable_fonts != system_lyxrc.use_scalable_fonts) { @@ -1828,6 +1892,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SCREEN_FONT_SIZES: if (ignore_system_lyxrc || font_sizes[FONT_SIZE_TINY] @@ -1870,6 +1935,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FULL_SCREEN_LIMIT: if (ignore_system_lyxrc || full_screen_limit != system_lyxrc.full_screen_limit) { @@ -1879,6 +1945,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FULL_SCREEN_TOOLBARS: if (ignore_system_lyxrc || full_screen_toolbars != system_lyxrc.full_screen_toolbars) { @@ -1888,6 +1955,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FULL_SCREEN_SCROLLBAR: if (ignore_system_lyxrc || full_screen_scrollbar != system_lyxrc.full_screen_scrollbar) { @@ -1897,6 +1965,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FULL_SCREEN_STATUSBAR: if (ignore_system_lyxrc || full_screen_statusbar != system_lyxrc.full_screen_statusbar) { @@ -1906,6 +1975,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FULL_SCREEN_TABBAR: if (ignore_system_lyxrc || full_screen_tabbar != system_lyxrc.full_screen_tabbar) { @@ -1915,6 +1985,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FULL_SCREEN_MENUBAR: if (ignore_system_lyxrc || full_screen_menubar != system_lyxrc.full_screen_menubar) { @@ -1924,6 +1995,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FULL_SCREEN_WIDTH: if (ignore_system_lyxrc || full_screen_width != system_lyxrc.full_screen_width) { @@ -1933,6 +2005,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_OPEN_BUFFERS_IN_TABS: if (ignore_system_lyxrc || open_buffers_in_tabs != system_lyxrc.open_buffers_in_tabs) { @@ -1942,6 +2015,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SINGLE_CLOSE_TAB_BUTTON: if (ignore_system_lyxrc || single_close_tab_button != system_lyxrc.single_close_tab_button) { @@ -1951,6 +2025,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SINGLE_INSTANCE: if (ignore_system_lyxrc || single_instance != system_lyxrc.single_instance) { @@ -1960,6 +2035,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FORWARD_SEARCH_DVI: if (ignore_system_lyxrc || forward_search_dvi != system_lyxrc.forward_search_dvi) { @@ -1967,6 +2043,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_FORWARD_SEARCH_PDF: if (ignore_system_lyxrc || forward_search_pdf != system_lyxrc.forward_search_pdf) { @@ -1979,6 +2056,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# COLOR SECTION ###################################\n" << "#\n\n"; + // fall through case RC_SET_COLOR: for (int i = 0; i < Color_ignore; ++i) { ColorCode lc = static_cast(i); @@ -1997,6 +2075,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# PRINTER SECTION ###################################\n" << "#\n\n"; + // fall through case RC_PRINTLANDSCAPEFLAG: if (ignore_system_lyxrc || print_landscape_flag != system_lyxrc.print_landscape_flag) { @@ -2005,7 +2084,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_PRINTPAPERFLAG: if (ignore_system_lyxrc || print_paper_flag != system_lyxrc.print_paper_flag) { @@ -2014,7 +2093,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_PRINTPAPERDIMENSIONFLAG: if (ignore_system_lyxrc || print_paper_dimension_flag @@ -2029,6 +2108,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# TEX SECTION #######################################\n" << "#\n\n"; + // fall through case RC_TEXINPUTS_PREFIX: if (ignore_system_lyxrc || texinputs_prefix != system_lyxrc.texinputs_prefix) { @@ -2036,7 +2116,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_FONT_ENCODING: if (ignore_system_lyxrc || fontenc != system_lyxrc.fontenc) { @@ -2049,6 +2129,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# FILE SECTION ######################################\n" << "#\n\n"; + // fall through case RC_DOCUMENTPATH: if (ignore_system_lyxrc || document_path != system_lyxrc.document_path) { @@ -2057,6 +2138,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_USELASTFILEPOS: if (ignore_system_lyxrc || use_lastfilepos != system_lyxrc.use_lastfilepos) { @@ -2065,6 +2147,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LOADSESSION: if (ignore_system_lyxrc || load_session != system_lyxrc.load_session) { @@ -2073,6 +2156,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_MOUSE_WHEEL_SPEED: if (ignore_system_lyxrc || mouse_wheel_speed != system_lyxrc.mouse_wheel_speed) { @@ -2080,6 +2164,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_MOUSE_MIDDLEBUTTON_PASTE: if (ignore_system_lyxrc || mouse_middlebutton_paste != system_lyxrc.mouse_middlebutton_paste) { @@ -2088,6 +2173,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_INLINE_DELAY: if (ignore_system_lyxrc || completion_inline_delay != system_lyxrc.completion_inline_delay) { @@ -2095,6 +2181,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_INLINE_MATH: if (ignore_system_lyxrc || completion_inline_math != system_lyxrc.completion_inline_math) { @@ -2103,6 +2190,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_INLINE_TEXT: if (ignore_system_lyxrc || completion_inline_text != system_lyxrc.completion_inline_text) { @@ -2111,6 +2199,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_INLINE_DOTS: if (ignore_system_lyxrc || completion_inline_dots != system_lyxrc.completion_inline_dots) { @@ -2119,6 +2208,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_AUTOCORRECTION_MATH: if (ignore_system_lyxrc || autocorrection_math != system_lyxrc.autocorrection_math) { @@ -2127,6 +2217,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_POPUP_DELAY: if (ignore_system_lyxrc || completion_popup_delay != system_lyxrc.completion_popup_delay) { @@ -2134,6 +2225,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_POPUP_MATH: if (ignore_system_lyxrc || completion_popup_math != system_lyxrc.completion_popup_math) { @@ -2142,6 +2234,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_POPUP_TEXT: if (ignore_system_lyxrc || completion_popup_text != system_lyxrc.completion_popup_text) { @@ -2150,6 +2243,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_CURSOR_TEXT: if (ignore_system_lyxrc || completion_cursor_text != system_lyxrc.completion_cursor_text) { @@ -2158,6 +2252,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_POPUP_AFTER_COMPLETE: if (ignore_system_lyxrc || completion_popup_after_complete @@ -2167,6 +2262,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_COMPLETION_MINLENGTH: if (ignore_system_lyxrc || completion_minlength != system_lyxrc.completion_minlength) { @@ -2175,14 +2271,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - - case RC_NUMLASTFILES: + // fall through + case RC_NUMLASTFILES: if (ignore_system_lyxrc || num_lastfiles != system_lyxrc.num_lastfiles) { os << "\\num_lastfiles " << num_lastfiles << '\n'; } if (tag != RC_LAST) break; + // fall through case RC_CHECKLASTFILES: if (ignore_system_lyxrc || check_lastfiles != system_lyxrc.check_lastfiles) { @@ -2191,6 +2288,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_EXAMPLEPATH: if (ignore_system_lyxrc || example_path != system_lyxrc.example_path) { @@ -2199,6 +2297,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_TEMPLATEPATH: if (ignore_system_lyxrc || template_path != system_lyxrc.template_path) { @@ -2207,6 +2306,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_TEMPDIRPATH: if (ignore_system_lyxrc || tempdir_path != system_lyxrc.tempdir_path) { @@ -2215,6 +2315,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_THESAURUSDIRPATH: if (ignore_system_lyxrc || thesaurusdir_path != system_lyxrc.thesaurusdir_path) { @@ -2223,6 +2324,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_HUNSPELLDIR_PATH: if (ignore_system_lyxrc || hunspelldir_path != system_lyxrc.hunspelldir_path) { @@ -2231,6 +2333,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_PLAINTEXT_LINELEN: if (ignore_system_lyxrc || plaintext_linelen != system_lyxrc.plaintext_linelen) { @@ -2238,6 +2341,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_MAKE_BACKUP: if (ignore_system_lyxrc || make_backup != system_lyxrc.make_backup) { @@ -2245,6 +2349,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SAVE_COMPRESSED: if (ignore_system_lyxrc || save_compressed != system_lyxrc.save_compressed) { @@ -2252,6 +2357,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_SAVE_ORIGIN: if (ignore_system_lyxrc || save_origin != system_lyxrc.save_origin) { @@ -2259,6 +2365,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_BACKUPDIR_PATH: if (ignore_system_lyxrc || backupdir_path != system_lyxrc.backupdir_path) { @@ -2276,6 +2383,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# SPELLCHECKER SECTION ##############################\n" << "#\n\n"; + // fall through case RC_ACCEPT_COMPOUND: if (ignore_system_lyxrc || spellchecker_accept_compound != system_lyxrc.spellchecker_accept_compound) { @@ -2284,6 +2392,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_ALT_LANG: if (ignore_system_lyxrc || spellchecker_alt_lang != system_lyxrc.spellchecker_alt_lang) { @@ -2292,6 +2401,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_ESC_CHARS: if (ignore_system_lyxrc || spellchecker_esc_chars != system_lyxrc.spellchecker_esc_chars) { @@ -2299,6 +2409,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_USE_SYSTEM_COLORS: if (ignore_system_lyxrc || use_system_colors != system_lyxrc.use_system_colors) { @@ -2308,6 +2419,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_USE_TOOLTIP: if (ignore_system_lyxrc || use_tooltip != system_lyxrc.use_tooltip) { @@ -2317,6 +2429,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_USE_PIXMAP_CACHE: if (ignore_system_lyxrc || use_pixmap_cache != system_lyxrc.use_pixmap_cache) { @@ -2326,6 +2439,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_USE_QIMAGE: if (ignore_system_lyxrc || use_qimage != system_lyxrc.use_qimage) { @@ -2340,6 +2454,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# LANGUAGE SUPPORT SECTION ##########################\n" << "#\n\n"; + // fall through case RC_DEFAULT_DECIMAL_POINT: if (ignore_system_lyxrc || default_decimal_point != system_lyxrc.default_decimal_point) { @@ -2347,7 +2462,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_DEFAULT_LENGTH_UNIT: if (ignore_system_lyxrc || default_length_unit != system_lyxrc.default_length_unit) { @@ -2355,7 +2470,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_SPELLCHECKER: if (ignore_system_lyxrc || spellchecker != system_lyxrc.spellchecker) { @@ -2363,7 +2478,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_SPELLCHECK_CONTINUOUSLY: if (ignore_system_lyxrc || spellcheck_continuously != system_lyxrc.spellcheck_continuously) { @@ -2372,7 +2487,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_SPELLCHECK_NOTES: if (ignore_system_lyxrc || spellcheck_notes != system_lyxrc.spellcheck_notes) { @@ -2381,7 +2496,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_VISUAL_CURSOR: if (ignore_system_lyxrc || visual_cursor != system_lyxrc.visual_cursor) { @@ -2389,6 +2504,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_CLOSE_BUFFER_WITH_LAST_VIEW: if (ignore_system_lyxrc || close_buffer_with_last_view != system_lyxrc.close_buffer_with_last_view) { @@ -2397,6 +2513,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_CUSTOM_PACKAGE: if (ignore_system_lyxrc || language_custom_package != system_lyxrc.language_custom_package) { @@ -2405,6 +2522,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_GLOBAL_OPTIONS: if (ignore_system_lyxrc || language_global_options @@ -2415,6 +2533,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_PACKAGE_SELECTION: if (ignore_system_lyxrc || language_package_selection != system_lyxrc.language_package_selection) { @@ -2436,6 +2555,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_COMMAND_BEGIN: if (ignore_system_lyxrc || language_command_begin @@ -2446,6 +2566,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_COMMAND_END: if (ignore_system_lyxrc || language_command_end @@ -2455,6 +2576,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_COMMAND_LOCAL: if (ignore_system_lyxrc || language_command_local @@ -2465,6 +2587,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_AUTO_BEGIN: if (ignore_system_lyxrc || language_auto_begin != system_lyxrc.language_auto_begin) { @@ -2473,6 +2596,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_LANGUAGE_AUTO_END: if (ignore_system_lyxrc || language_auto_end != system_lyxrc.language_auto_end) { @@ -2481,6 +2605,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_MARK_FOREIGN_LANGUAGE: if (ignore_system_lyxrc || mark_foreign_language @@ -2495,6 +2620,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# 2nd MISC SUPPORT SECTION ##########################\n" << "#\n\n"; + // fall through case RC_AUTO_NUMBER: if (ignore_system_lyxrc || auto_number != system_lyxrc.auto_number) { @@ -2502,6 +2628,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_GUI_LANGUAGE: if (ignore_system_lyxrc || gui_language != system_lyxrc.gui_language) { @@ -2509,6 +2636,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_EXPORT_OVERWRITE: if (ignore_system_lyxrc || export_overwrite != system_lyxrc.export_overwrite) { @@ -2528,7 +2656,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - + // fall through case RC_SCROLL_WHEEL_ZOOM: if (ignore_system_lyxrc || scroll_wheel_zoom != system_lyxrc.scroll_wheel_zoom) { @@ -2556,12 +2684,13 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# FORMATS SECTION ##########################\n" << "#\n\n"; + // fall through case RC_FILEFORMAT: // New/modified formats - for (Formats::const_iterator cit = formats.begin(); - cit != formats.end(); ++cit) { + for (Formats::const_iterator cit = theFormats().begin(); + cit != theFormats().end(); ++cit) { Format const * format = - system_formats.getFormat(cit->name()); + theSystemFormats().getFormat(cit->name()); if (!format || format->extensions() != cit->extensions() || format->prettyname() != cit->prettyname() || @@ -2594,13 +2723,14 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } // Look for deleted formats - for (Formats::const_iterator cit = system_formats.begin(); - cit != system_formats.end(); ++cit) - if (!formats.getFormat(cit->name())) + for (Formats::const_iterator cit = theSystemFormats().begin(); + cit != theSystemFormats().end(); ++cit) + if (!theFormats().getFormat(cit->name())) os << "\\format \"" << cit->name() << "\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"\n"; if (tag != RC_LAST) break; + // fall through case RC_VIEWER_ALTERNATIVES: { Alternatives::const_iterator it = viewer_alternatives.begin(); Alternatives::const_iterator const en = viewer_alternatives.end(); @@ -2626,6 +2756,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c if (tag != RC_LAST) break; } + // fall through case RC_EDITOR_ALTERNATIVES: { Alternatives::const_iterator it = editor_alternatives.begin(); Alternatives::const_iterator const en = editor_alternatives.end(); @@ -2651,6 +2782,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c if (tag != RC_LAST) break; } + // fall through case RC_DEFAULT_OTF_VIEW_FORMAT: if ((ignore_system_lyxrc || default_otf_view_format != system_lyxrc.default_otf_view_format) @@ -2659,6 +2791,16 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through + case RC_DEFAULT_PLATEX_VIEW_FORMAT: + if ((ignore_system_lyxrc || + default_platex_view_format != system_lyxrc.default_platex_view_format) + && !default_platex_view_format.empty()) { + os << "\\default_platex_view_format " << default_platex_view_format << '\n'; + } + if (tag != RC_LAST) + break; + // fall through case RC_DEFAULT_VIEW_FORMAT: if (ignore_system_lyxrc || default_view_format != system_lyxrc.default_view_format) { @@ -2666,6 +2808,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through case RC_VIEWER: // Ignore it if (tag != RC_LAST) @@ -2675,6 +2818,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "# CONVERTERS SECTION ##########################\n" << "#\n\n"; + // fall through case RC_CONVERTER: // Look for new converters for (Converters::const_iterator cit = theConverters().begin(); @@ -2699,7 +2843,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c << "\" \"" << cit->to() << "\" \"\" \"\"\n"; if (tag != RC_LAST) break; - + // fall through case RC_COPIER: if (tag == RC_LAST) os << "\n#\n" @@ -2783,6 +2927,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) case LyXRC::RC_DATE_INSERT_FORMAT: case LyXRC::RC_GUI_LANGUAGE: case LyXRC::RC_DEFAULT_OTF_VIEW_FORMAT: + case LyXRC::RC_DEFAULT_PLATEX_VIEW_FORMAT: case LyXRC::RC_DEFAULT_VIEW_FORMAT: case LyXRC::RC_DEFFILE: case LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN: @@ -2808,6 +2953,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) case LyXRC::RC_JBIBTEX_ALTERNATIVES: case LyXRC::RC_JINDEX_COMMAND: case LyXRC::RC_NOMENCL_COMMAND: + case LyXRC::RC_PYGMENTIZE_COMMAND: case LyXRC::RC_INPUT: case LyXRC::RC_KBMAP: case LyXRC::RC_KBMAP_PRIMARY: @@ -3066,6 +3212,10 @@ string const LyXRC::getDescription(LyXRCTags tag) str = _("Define the options of makeindex (cf. man makeindex) to be used for nomenclatures. This might differ from the index processing options."); break; + case RC_PYGMENTIZE_COMMAND: + str = _("The command to run the python pygments syntax highlighter."); + break; + case RC_INPUT: break;