#include "Lexer.h"
#include "LyX.h"
#include "Mover.h"
-#include "Session.h"
#include "SpellChecker.h"
#include "version.h"
-#include "graphics/GraphicsTypes.h"
-
#include "support/convert.h"
#include "support/debug.h"
#include "support/environment.h"
#include "support/FileName.h"
#include "support/filetools.h"
-#include "support/gettext.h"
#include "support/lstrings.h"
#include "support/os.h"
#include "support/Package.h"
#include "support/TempFile.h"
-#include "support/userinfo.h"
+
+#ifdef USE_MACOSX_PACKAGING
+#include "support/AppleSupport.h"
+#endif
#include <fstream>
#include <iostream>
// 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 = 32; // spitz: add \ct_markup_copied
+static unsigned int const LYXRC_FILEFORMAT = 34; // yuriy: rename kmap files
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
{ "\\bind_file", LyXRC::RC_BINDFILE },
{ "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
{ "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
+ { "\\citation_search", LyXRC::RC_CITATION_SEARCH },
+ { "\\citation_search_pattern", LyXRC::RC_CITATION_SEARCH_PATTERN },
+ { "\\citation_search_view", LyXRC::RC_CITATION_SEARCH_VIEW },
{ "\\close_buffer_with_last_view", LyXRC::RC_CLOSE_BUFFER_WITH_LAST_VIEW },
{ "\\completion_cursor_text", LyXRC::RC_COMPLETION_CURSOR_TEXT },
{ "\\completion_inline_delay", LyXRC::RC_COMPLETION_INLINE_DELAY },
// 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_CITATION_SEARCH:
+ lexrc >> citation_search;
+ break;
+
+ case RC_CITATION_SEARCH_PATTERN:
+ if (lexrc.next())
+ citation_search_pattern = lexrc.getString();
+ break;
+
+ case RC_CITATION_SEARCH_VIEW:
+ if (lexrc.next())
+ citation_search_view = lexrc.getString();
+ break;
+
case RC_CT_ADDITIONS_UNDERLINED:
lexrc >> ct_additions_underlined;
break;
if (tag != RC_LAST)
break;
// fall through
+ case RC_CITATION_SEARCH:
+ if (ignore_system_lyxrc ||
+ citation_search != system_lyxrc.citation_search) {
+ os << "# Set to true to use script to search\n"
+ << "# locl disk for citation targets.\n"
+ << "\\citation_search "
+ << convert<string>(citation_search)
+ << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
+ case RC_CITATION_SEARCH_VIEW:
+ if (ignore_system_lyxrc ||
+ citation_search_view != system_lyxrc.citation_search_view) {
+ os << "\\citation_search_view \""
+ << citation_search_view << "\"\n";
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
+ case RC_CITATION_SEARCH_PATTERN:
+ if (ignore_system_lyxrc ||
+ citation_search_pattern != system_lyxrc.citation_search_pattern) {
+ os << "\\citation_search_pattern \""
+ << citation_search_pattern << "\"\n";
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
case RC_CT_ADDITIONS_UNDERLINED:
if (ignore_system_lyxrc ||
ct_additions_underlined
case LyXRC::RC_BIBTEX_ALTERNATIVES:
case LyXRC::RC_BIBTEX_COMMAND:
case LyXRC::RC_BINDFILE:
+ case LyXRC::RC_CITATION_SEARCH:
+ case LyXRC::RC_CITATION_SEARCH_PATTERN:
+ case LyXRC::RC_CITATION_SEARCH_VIEW:
case LyXRC::RC_CHECKLASTFILES:
case LyXRC::RC_COMPLETION_CURSOR_TEXT:
case LyXRC::RC_COMPLETION_INLINE_DELAY: