// 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 = 35; // spitz: dark mode colors
+static unsigned int const LYXRC_FILEFORMAT = 36; // rkh: spellcheck_continuously default
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
{ "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
{ "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
{ "\\document_path", LyXRC::RC_DOCUMENTPATH },
+ { "\\draw_strategy", LyXRC::RC_DRAW_STRATEGY },
{ "\\editor_alternatives", LyXRC::RC_EDITOR_ALTERNATIVES },
{ "\\escape_chars", LyXRC::RC_ESC_CHARS },
{ "\\example_path", LyXRC::RC_EXAMPLEPATH },
+ { "\\experimental:bookmarks_visibility", LyXRC::RC_BOOKMARKS_VISIBILITY },
{ "\\export_overwrite", LyXRC::RC_EXPORT_OVERWRITE },
{ "\\format", LyXRC::RC_FILEFORMAT },
{ "\\forward_search_dvi", LyXRC::RC_FORWARD_SEARCH_DVI },
// format prior to 2.0 and introduction of format tag
unsigned int rc_format = 0;
-#ifdef USE_MACOSX_PACKAGING
- open_buffers_in_tabs = appleUserTabbingPreferenceAlways();
-#endif
-
while (lexrc.isOK()) {
// By using two switches we take advantage of the compiler
// telling us if we have missed a LyXRCTags element in
break;
case RC_OPEN_BUFFERS_IN_TABS:
lexrc >> open_buffers_in_tabs;
+#ifdef USE_MACOSX_PACKAGING
+ if (appleUserTabbingPreferenceAlways())
+ open_buffers_in_tabs = true;
+#endif
break;
case RC_SINGLE_CLOSE_TAB_BUTTON:
lexrc >> single_close_tab_button;
lexrc >> mouse_middlebutton_paste;
break;
+ case RC_BOOKMARKS_VISIBILITY:
+ if (lexrc.next()) {
+ string const tmp = lexrc.getString();
+ if (tmp == "none")
+ bookmarks_visibility = BMK_NONE;
+ else if (tmp == "margin")
+ bookmarks_visibility = BMK_MARGIN;
+ else if (tmp == "inline")
+ bookmarks_visibility = BMK_INLINE;
+ else {
+ bookmarks_visibility = BMK_NONE;
+ LYXERR0("Unrecognized bookmark visibility " << tmp <<'"');
+ }
+ }
+ break;
+
+ case RC_DRAW_STRATEGY:
+ if (lexrc.next()) {
+ string const tmp = lexrc.getString();
+ if (tmp == "partial")
+ draw_strategy = DS_PARTIAL;
+ else if (tmp == "backingstore")
+ draw_strategy = DS_BACKINGSTORE;
+ else {
+ draw_strategy = DS_PARTIAL;
+ LYXERR0("Unrecognized draw strategy " << tmp <<'"');
+ }
+ }
+ break;
+
case RC_LAST:
break; // this is just a dummy
}
if (tag != RC_LAST)
break;
// fall through
+ case RC_BOOKMARKS_VISIBILITY:
+ if (ignore_system_lyxrc ||
+ bookmarks_visibility != system_lyxrc.bookmarks_visibility) {
+ string status;
+ switch (bookmarks_visibility) {
+ case BMK_NONE:
+ status = "none";
+ break;
+ case BMK_INLINE:
+ status = "inline";
+ break;
+ case BMK_MARGIN:
+ status = "margin";
+ break;
+ }
+ os << "\\experimental:bookmarks_visibility " << status << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
case RC_MAC_DONTSWAP_CTRL_META:
if (ignore_system_lyxrc ||
mac_dontswap_ctrl_meta
}
if (tag != RC_LAST)
break;
+ // fall through
+ case RC_DRAW_STRATEGY:
+ if (ignore_system_lyxrc ||
+ draw_strategy != system_lyxrc.draw_strategy) {
+ string status;
+ switch (draw_strategy) {
+ case DS_PARTIAL:
+ status = "partial";
+ break;
+ case DS_BACKINGSTORE:
+ status = "backingstore";
+ break;
+ }
+ os << "\\draw_strategy " << status << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
os << "\n#\n"
- << "# COLOR SECTION ###################################\n"
- << "#\n\n";
+ << "# COLOR SECTION ###################################\n"
+ << "#\n\n";
// fall through
case RC_SET_COLOR:
break;
// fall through
case RC_DEFAULT_VIEW_FORMAT:
- if (ignore_system_lyxrc ||
- default_view_format != system_lyxrc.default_view_format) {
+ if ((ignore_system_lyxrc ||
+ default_view_format != system_lyxrc.default_view_format)
+ && !default_view_format.empty()) {
os << "\\default_view_format " << default_view_format << '\n';
}
if (tag != RC_LAST)
case LyXRC::RC_BIBTEX_ALTERNATIVES:
case LyXRC::RC_BIBTEX_COMMAND:
case LyXRC::RC_BINDFILE:
+ case LyXRC::RC_BOOKMARKS_VISIBILITY:
case LyXRC::RC_CITATION_SEARCH:
case LyXRC::RC_CITATION_SEARCH_PATTERN:
case LyXRC::RC_CITATION_SEARCH_VIEW:
package().document_dir() = FileName(lyxrc.document_path);
}
// fall through
+ case LyXRC::RC_DRAW_STRATEGY:
case LyXRC::RC_EDITOR_ALTERNATIVES:
case LyXRC::RC_ESC_CHARS:
case LyXRC::RC_EXAMPLEPATH: