X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXRC.cpp;h=13164373f68ff416bdeb2407756461ada94cd4e9;hb=bfe98181169d9e697e515da974d9b6a15a06c940;hp=0ea13c55d00312d3f1c0501a54038205808cd816;hpb=0f0ad1f715b914d424b6edd01aad2e559e8e85f5;p=lyx.git diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 0ea13c55d0..13164373f6 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -107,6 +107,7 @@ LexerKeyword lyxrcTags[] = { { "\\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 }, @@ -286,10 +287,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) // 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 @@ -1064,6 +1061,10 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) 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; @@ -1126,7 +1127,7 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) else if (tmp == "margin") bookmarks_visibility = BMK_MARGIN; else if (tmp == "inline") - bookmarks_visibility = BMK_MARGIN; + bookmarks_visibility = BMK_INLINE; else { bookmarks_visibility = BMK_NONE; LYXERR0("Unrecognized bookmark visibility " << tmp <<'"'); @@ -1134,6 +1135,19 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) } 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 @@ -1754,7 +1768,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 @@ -2021,10 +2035,28 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } 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: @@ -2910,6 +2942,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) 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: