X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FLyXRC.cpp;h=4ba14e6c7fa437b45dd7e4862b3b7d3423ec63c8;hb=e694199837172dd4927eb64112e00f85a426eb8e;hp=355e0651192bf8d3822ddb2a21130884b9093a75;hpb=244de5d2c10a990828eafdd72283fc87742dc133;p=lyx.git diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 355e065119..4ba14e6c7f 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 = 19; // rgh: remove print support +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 }, @@ -124,6 +125,7 @@ LexerKeyword lyxrcTags[] = { { "\\index_alternatives", LyXRC::RC_INDEX_ALTERNATIVES }, { "\\index_command", LyXRC::RC_INDEX_COMMAND }, { "\\input", LyXRC::RC_INPUT }, + { "\\jbibtex_alternatives", LyXRC::RC_JBIBTEX_ALTERNATIVES }, { "\\jbibtex_command", LyXRC::RC_JBIBTEX_COMMAND }, { "\\jindex_command", LyXRC::RC_JINDEX_COMMAND }, { "\\kbmap", LyXRC::RC_KBMAP }, @@ -157,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 }, @@ -192,6 +195,7 @@ LexerKeyword lyxrcTags[] = { { "\\use_converter_needauth", LyXRC::RC_USE_CONVERTER_NEEDAUTH }, { "\\use_converter_needauth_forbidden", LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN }, { "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS }, + { "\\use_native_filedialog", LyXRC::RC_USE_NATIVE_FILEDIALOG }, { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE }, { "\\use_qimage", LyXRC::RC_USE_QIMAGE }, // compatibility with versions older than 1.4.0 only @@ -210,7 +214,7 @@ LexerKeyword lyxrcTags[] = { const int lyxrcCount = sizeof(lyxrcTags) / sizeof(lyxrcTags[0]); -} // namespace anon +} // namespace LyXRC::LyXRC() @@ -235,14 +239,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 = "bibtex"; + 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"; @@ -267,6 +274,7 @@ void LyXRC::setDefaults() num_lastfiles = 20; check_lastfiles = true; use_lastfilepos = true; + use_native_filedialog = true; load_session = false; make_backup = true; save_compressed = false; @@ -277,6 +285,8 @@ void LyXRC::setDefaults() // FIXME: this check should test the target platform (darwin) #if defined(USE_MACOSX_PACKAGING) spellchecker = "native"; +#elif defined(USE_ENCHANT) + spellchecker = "enchant"; #elif defined(USE_ASPELL) spellchecker = "aspell"; #elif defined(USE_HUNSPELL) @@ -373,7 +383,7 @@ void oldFontFormat(string & family, string & foundry) foundry.erase(); } -} // namespace anon +} // namespace bool LyXRC::read(FileName const & filename, bool check_format) @@ -401,6 +411,8 @@ bool LyXRC::read(FileName const & filename, bool check_format) lexrc2.setFile(tempfile); LYXERR(Debug::LYXRC, "Reading '" << tempfile << "'..."); retval = read(lexrc2, check_format); + if (retval == FormatMismatch) + LYXERR0("Conversion failed for " << filename.absFileName()); } return retval == ReadOK; } @@ -456,7 +468,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()); } @@ -542,6 +554,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(); @@ -573,6 +591,12 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) } break; + case RC_JBIBTEX_ALTERNATIVES: + if (lexrc.next(true)) { + jbibtex_alternatives.insert(lexrc.getString()); + } + break; + case RC_INDEX_ALTERNATIVES: if (lexrc.next(true)) { index_alternatives.insert(lexrc.getString()); @@ -608,9 +632,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: @@ -855,6 +879,9 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) case RC_ACCEPT_COMPOUND: lexrc >> spellchecker_accept_compound; break; + case RC_USE_NATIVE_FILEDIALOG: + lexrc >> use_native_filedialog; + break; case RC_USE_SYSTEM_COLORS: lexrc >> use_system_colors; break; @@ -987,7 +1014,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: { @@ -1038,9 +1065,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; @@ -1066,6 +1093,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; @@ -1220,7 +1251,7 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) } /// Update converters data-structures - theConverters().update(formats); + theConverters().update(theFormats()); theConverters().buildGraph(); theBufferList().invalidateConverterCache(); @@ -1271,7 +1302,7 @@ namespace { "\"", "\\\""); } -} +} // namespace void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const @@ -1308,7 +1339,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) { @@ -1325,7 +1356,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) { @@ -1333,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_UIFILE: if (ignore_system_lyxrc || ui_file != system_lyxrc.ui_file) { @@ -1341,6 +1373,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) { @@ -1351,6 +1384,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) { @@ -1362,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_AUTOSAVE: if (ignore_system_lyxrc || autosave != system_lyxrc.autosave) { @@ -1370,6 +1405,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) { @@ -1381,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_SORT_LAYOUTS: if (ignore_system_lyxrc || sort_layouts != system_lyxrc.sort_layouts) { @@ -1389,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_GROUP_LAYOUTS: if (ignore_system_lyxrc || group_layouts != system_lyxrc.group_layouts) { @@ -1397,6 +1435,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 @@ -1408,6 +1447,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) { @@ -1415,6 +1455,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(); @@ -1427,6 +1468,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) { @@ -1434,6 +1476,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) { @@ -1441,6 +1484,20 @@ 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(); + for ( ; it != end; ++it) { + if (ignore_system_lyxrc + || !system_lyxrc.jbibtex_alternatives.count(*it)) + os << "\\jbibtex_alternatives \"" + << *it << "\"\n"; + } + 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(); @@ -1453,6 +1510,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) { @@ -1460,6 +1518,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) { @@ -1467,6 +1526,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) { @@ -1474,6 +1534,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) { @@ -1481,6 +1542,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). @@ -1490,6 +1560,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 " @@ -1497,6 +1568,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) { @@ -1504,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_PRIMARY: if (ignore_system_lyxrc || primary_kbmap != system_lyxrc.primary_kbmap) { @@ -1512,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_KBMAP_SECONDARY: if (ignore_system_lyxrc || secondary_kbmap != system_lyxrc.secondary_kbmap) { @@ -1520,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_SERVERPIPE: if (ignore_system_lyxrc || lyxpipes != system_lyxrc.lyxpipes) { @@ -1528,6 +1603,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) { @@ -1536,17 +1612,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) { @@ -1554,7 +1630,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) { @@ -1574,7 +1650,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 != @@ -1584,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_PREVIEW_SCALE_FACTOR: if (ignore_system_lyxrc || preview_scale_factor != system_lyxrc.preview_scale_factor) { @@ -1593,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_CACHE: if (ignore_system_lyxrc || use_converter_cache != system_lyxrc.use_converter_cache) { @@ -1602,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_FORBIDDEN: if (ignore_system_lyxrc || use_converter_needauth_forbidden != system_lyxrc.use_converter_needauth_forbidden) { @@ -1611,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_USE_CONVERTER_NEEDAUTH: if (ignore_system_lyxrc || use_converter_needauth != system_lyxrc.use_converter_needauth) { @@ -1620,7 +1696,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) { @@ -1633,7 +1709,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) { @@ -1642,7 +1718,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) { @@ -1652,7 +1728,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) { @@ -1660,13 +1736,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) { @@ -1675,6 +1753,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 @@ -1684,6 +1763,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 @@ -1693,6 +1773,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 @@ -1702,6 +1783,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 @@ -1711,6 +1793,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 @@ -1720,6 +1803,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 @@ -1729,6 +1813,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 @@ -1742,6 +1827,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 @@ -1751,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: if (ignore_system_lyxrc || roman_font_name != system_lyxrc.roman_font_name) { @@ -1759,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_ROMAN_FOUNDRY: if (ignore_system_lyxrc || roman_font_foundry != system_lyxrc.roman_font_foundry) { @@ -1767,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: if (ignore_system_lyxrc || sans_font_name != system_lyxrc.sans_font_name) { @@ -1775,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_SANS_FOUNDRY: if (ignore_system_lyxrc || sans_font_foundry != system_lyxrc.sans_font_foundry) { @@ -1783,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: if (ignore_system_lyxrc || typewriter_font_name != system_lyxrc.typewriter_font_name) { @@ -1791,6 +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_TYPEWRITER_FOUNDRY: if (ignore_system_lyxrc || typewriter_font_foundry != system_lyxrc.typewriter_font_foundry) { @@ -1799,7 +1891,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) { @@ -1809,6 +1901,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] @@ -1851,6 +1944,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) { @@ -1860,6 +1954,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) { @@ -1869,6 +1964,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) { @@ -1878,6 +1974,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) { @@ -1887,6 +1984,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) { @@ -1896,6 +1994,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) { @@ -1905,6 +2004,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) { @@ -1914,6 +2014,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) { @@ -1923,6 +2024,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) { @@ -1932,6 +2034,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) { @@ -1941,6 +2044,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) { @@ -1948,6 +2052,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) { @@ -1960,6 +2065,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); @@ -1978,6 +2084,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) { @@ -1986,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_PRINTPAPERFLAG: if (ignore_system_lyxrc || print_paper_flag != system_lyxrc.print_paper_flag) { @@ -1995,7 +2102,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 @@ -2010,6 +2117,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) { @@ -2017,7 +2125,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) { @@ -2030,6 +2138,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) { @@ -2038,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_USELASTFILEPOS: if (ignore_system_lyxrc || use_lastfilepos != system_lyxrc.use_lastfilepos) { @@ -2046,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_LOADSESSION: if (ignore_system_lyxrc || load_session != system_lyxrc.load_session) { @@ -2054,6 +2165,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) { @@ -2061,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_MOUSE_MIDDLEBUTTON_PASTE: if (ignore_system_lyxrc || mouse_middlebutton_paste != system_lyxrc.mouse_middlebutton_paste) { @@ -2069,6 +2182,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) { @@ -2076,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_MATH: if (ignore_system_lyxrc || completion_inline_math != system_lyxrc.completion_inline_math) { @@ -2084,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_TEXT: if (ignore_system_lyxrc || completion_inline_text != system_lyxrc.completion_inline_text) { @@ -2092,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_COMPLETION_INLINE_DOTS: if (ignore_system_lyxrc || completion_inline_dots != system_lyxrc.completion_inline_dots) { @@ -2100,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_AUTOCORRECTION_MATH: if (ignore_system_lyxrc || autocorrection_math != system_lyxrc.autocorrection_math) { @@ -2108,6 +2226,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) { @@ -2115,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_MATH: if (ignore_system_lyxrc || completion_popup_math != system_lyxrc.completion_popup_math) { @@ -2123,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_POPUP_TEXT: if (ignore_system_lyxrc || completion_popup_text != system_lyxrc.completion_popup_text) { @@ -2131,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_CURSOR_TEXT: if (ignore_system_lyxrc || completion_cursor_text != system_lyxrc.completion_cursor_text) { @@ -2139,6 +2261,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 @@ -2148,6 +2271,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) { @@ -2156,14 +2280,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) { @@ -2172,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_EXAMPLEPATH: if (ignore_system_lyxrc || example_path != system_lyxrc.example_path) { @@ -2180,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_TEMPLATEPATH: if (ignore_system_lyxrc || template_path != system_lyxrc.template_path) { @@ -2188,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_TEMPDIRPATH: if (ignore_system_lyxrc || tempdir_path != system_lyxrc.tempdir_path) { @@ -2196,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_THESAURUSDIRPATH: if (ignore_system_lyxrc || thesaurusdir_path != system_lyxrc.thesaurusdir_path) { @@ -2204,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_HUNSPELLDIR_PATH: if (ignore_system_lyxrc || hunspelldir_path != system_lyxrc.hunspelldir_path) { @@ -2212,6 +2342,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) { @@ -2219,6 +2350,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) { @@ -2226,6 +2358,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) { @@ -2233,6 +2366,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) { @@ -2240,6 +2374,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) { @@ -2257,6 +2392,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) { @@ -2265,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_ALT_LANG: if (ignore_system_lyxrc || spellchecker_alt_lang != system_lyxrc.spellchecker_alt_lang) { @@ -2273,6 +2410,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) { @@ -2280,6 +2418,17 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; + // fall through + case RC_USE_NATIVE_FILEDIALOG: + if (ignore_system_lyxrc || + use_native_filedialog != system_lyxrc.use_native_filedialog) { + os << "\\use_native_filedialog " + << convert(use_native_filedialog) + << '\n'; + } + if (tag != RC_LAST) + break; + // fall through case RC_USE_SYSTEM_COLORS: if (ignore_system_lyxrc || use_system_colors != system_lyxrc.use_system_colors) { @@ -2289,6 +2438,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) { @@ -2298,6 +2448,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) { @@ -2307,6 +2458,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) { @@ -2321,6 +2473,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) { @@ -2328,7 +2481,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) { @@ -2336,7 +2489,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) { @@ -2344,7 +2497,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) { @@ -2353,7 +2506,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) { @@ -2362,7 +2515,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) { @@ -2370,6 +2523,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) { @@ -2378,6 +2532,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) { @@ -2386,6 +2541,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 @@ -2396,6 +2552,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) { @@ -2417,6 +2574,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 @@ -2427,6 +2585,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 @@ -2436,6 +2595,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 @@ -2446,6 +2606,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) { @@ -2454,6 +2615,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) { @@ -2462,6 +2624,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 @@ -2476,6 +2639,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) { @@ -2483,6 +2647,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) { @@ -2490,6 +2655,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) { @@ -2509,7 +2675,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) { @@ -2537,12 +2703,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() || @@ -2575,13 +2742,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(); @@ -2607,6 +2775,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(); @@ -2632,6 +2801,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) @@ -2640,6 +2810,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) { @@ -2647,6 +2827,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) @@ -2656,6 +2837,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(); @@ -2680,7 +2862,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" @@ -2764,6 +2946,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: @@ -2786,8 +2969,10 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) case LyXRC::RC_INDEX_ALTERNATIVES: case LyXRC::RC_INDEX_COMMAND: case LyXRC::RC_JBIBTEX_COMMAND: + 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: @@ -2863,6 +3048,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) case LyXRC::RC_USE_CONVERTER_CACHE: case LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN: case LyXRC::RC_USE_CONVERTER_NEEDAUTH: + case LyXRC::RC_USE_NATIVE_FILEDIALOG: case LyXRC::RC_USE_SYSTEM_COLORS: case LyXRC::RC_USE_TOOLTIP: case LyXRC::RC_USE_PIXMAP_CACHE: @@ -3046,6 +3232,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;