#include <fstream>
#include <iostream>
+#include <algorithm>
using namespace std;
using namespace lyx::support;
{ "\\language_package", LyXRC::RC_LANGUAGE_PACKAGE },
{ "\\language_use_babel", LyXRC::RC_LANGUAGE_USE_BABEL },
{ "\\load_session", LyXRC::RC_LOADSESSION },
+ { "\\mac_dontswap_ctrl_meta", LyXRC::RC_MAC_DONTSWAP_CTRL_META },
{ "\\mac_like_word_movement", LyXRC::RC_MAC_LIKE_WORD_MOVEMENT },
{ "\\macro_edit_style", LyXRC::RC_MACRO_EDIT_STYLE },
{ "\\make_backup", LyXRC::RC_MAKE_BACKUP },
{ "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
{ "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
{ "\\scroll_below_document", LyXRC::RC_SCROLL_BELOW_DOCUMENT },
+ { "\\scroll_wheel_zoom", LyXRC::RC_SCROLL_WHEEL_ZOOM },
{ "\\serverpipe", LyXRC::RC_SERVERPIPE },
{ "\\set_color", LyXRC::RC_SET_COLOR },
{ "\\show_banner", LyXRC::RC_SHOW_BANNER },
{ "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
// compatibility with versions older than 1.4.0 only
{ "\\use_pspell", LyXRC::RC_USE_SPELL_LIB },
+ { "\\use_system_colors", LyXRC::RC_USE_SYSTEM_COLORS },
// compatibility with versions older than 1.4.0 only
{ "\\use_tempdir", LyXRC::RC_USETEMPDIR },
{ "\\use_tooltip", LyXRC::RC_USE_TOOLTIP },
backupdir_path.erase();
display_graphics = true;
// Spellchecker settings:
-#if defined(USE_ASPELL)
+// FIXME: this check should test the target platform (darwin)
+#if defined(USE_MACOSX_PACKAGING)
+ spellchecker = "native";
+#elif defined(USE_ASPELL)
spellchecker = "aspell";
#elif defined(USE_HUNSPELL)
spellchecker = "hunspell";
date_insert_format = "%x";
cursor_follows_scrollbar = false;
scroll_below_document = false;
+ scroll_wheel_zoom = SCROLL_WHEEL_ZOOM_CTRL;
paragraph_markers = false;
+ mac_dontswap_ctrl_meta = false;
mac_like_word_movement = false;
macro_edit_style = MACRO_EDIT_INLINE_BOX;
dialogs_iconify_with_main = false;
preview_hashed_labels = false;
preview_scale_factor = 1.0;
use_converter_cache = true;
+ use_system_colors = false;
use_tooltip = true;
use_pixmap_cache = false;
converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
lexrc >> paragraph_markers;
break;
+ case RC_MAC_DONTSWAP_CTRL_META:
+ lexrc >> mac_dontswap_ctrl_meta;
+ break;
+
case RC_MAC_LIKE_WORD_MOVEMENT:
lexrc >> mac_like_word_movement;
break;
case RC_ACCEPT_COMPOUND:
lexrc >> spellchecker_accept_compound;
break;
+ case RC_USE_SYSTEM_COLORS:
+ lexrc >> use_system_colors;
+ break;
case RC_USE_TOOLTIP:
lexrc >> use_tooltip;
break;
}
}
break;
+ case RC_SCROLL_WHEEL_ZOOM:
+ if (lexrc.next()) {
+ string const tmp = lexrc.getString();
+ if (tmp == "ctrl")
+ scroll_wheel_zoom = SCROLL_WHEEL_ZOOM_CTRL;
+ else if (tmp == "shift")
+ scroll_wheel_zoom = SCROLL_WHEEL_ZOOM_SHIFT;
+ else if (tmp == "alt")
+ scroll_wheel_zoom = SCROLL_WHEEL_ZOOM_ALT;
+ else {
+ scroll_wheel_zoom = SCROLL_WHEEL_ZOOM_OFF;
+ if (tmp != "off" && tmp != "false")
+ LYXERR0("Unrecognized scroll_wheel_zoom status \""
+ << tmp << '"');
+ }
+ }
+ break;
// Obsoteted in 1.4.0
case RC_USETEMPDIR:
case PAPER_B3:
case PAPER_B4:
case PAPER_B6:
+ case PAPER_C0:
+ case PAPER_C1:
+ case PAPER_C2:
+ case PAPER_C3:
+ case PAPER_C4:
+ case PAPER_C5:
+ case PAPER_C6:
case PAPER_JISB0:
case PAPER_JISB1:
case PAPER_JISB2:
}
if (tag != RC_LAST)
break;
+ case RC_MAC_DONTSWAP_CTRL_META:
+ if (ignore_system_lyxrc ||
+ mac_dontswap_ctrl_meta
+ != system_lyxrc.mac_dontswap_ctrl_meta) {
+ os << "\\mac_dontswap_ctrl_meta "
+ << convert<string>(mac_dontswap_ctrl_meta) << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
case RC_MAC_LIKE_WORD_MOVEMENT:
if (ignore_system_lyxrc ||
mac_like_word_movement
// obsoleted in 2.0
if (tag != RC_LAST)
break;
+ case RC_USE_SYSTEM_COLORS:
+ if (ignore_system_lyxrc ||
+ use_system_colors != system_lyxrc.use_system_colors) {
+ os << "\\use_system_colors "
+ << convert<string>(use_system_colors)
+ << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
case RC_USE_TOOLTIP:
if (ignore_system_lyxrc ||
use_tooltip != system_lyxrc.use_tooltip) {
if (tag != RC_LAST)
break;
+ case RC_SCROLL_WHEEL_ZOOM:
+ if (ignore_system_lyxrc ||
+ scroll_wheel_zoom != system_lyxrc.scroll_wheel_zoom) {
+ string status;
+ switch (scroll_wheel_zoom) {
+ case SCROLL_WHEEL_ZOOM_OFF:
+ status = "off";
+ break;
+ case SCROLL_WHEEL_ZOOM_CTRL:
+ status = "ctrl";
+ break;
+ case SCROLL_WHEEL_ZOOM_SHIFT:
+ status = "shift";
+ break;
+ case SCROLL_WHEEL_ZOOM_ALT:
+ status = "alt";
+ break;
+ }
+ os << "\\scroll_wheel_zoom " << status << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
+
os << "\n#\n"
<< "# FORMATS SECTION ##########################\n"
<< "#\n\n";
case LyXRC::RC_LANGUAGE_GLOBAL_OPTIONS:
case LyXRC::RC_LANGUAGE_PACKAGE:
case LyXRC::RC_LANGUAGE_USE_BABEL:
+ case LyXRC::RC_MAC_DONTSWAP_CTRL_META:
case LyXRC::RC_MAC_LIKE_WORD_MOVEMENT:
case LyXRC::RC_MACRO_EDIT_STYLE:
case LyXRC::RC_MAKE_BACKUP:
case LyXRC::RC_USE_ESC_CHARS:
case LyXRC::RC_USE_INP_ENC:
case LyXRC::RC_USE_PERS_DICT:
+ case LyXRC::RC_USE_SYSTEM_COLORS:
case LyXRC::RC_USE_TOOLTIP:
case LyXRC::RC_USE_PIXMAP_CACHE:
case LyXRC::RC_USE_SPELL_LIB:
case LyXRC::RC_FORWARD_SEARCH_PDF:
case LyXRC::RC_EXPORT_OVERWRITE:
case LyXRC::RC_DEFAULT_DECIMAL_POINT:
+ case LyXRC::RC_SCROLL_WHEEL_ZOOM:
case LyXRC::RC_LAST:
break;
}
str = _("LyX normally doesn't allow the user to scroll further than the bottom of the document. Set to true if you prefer to scroll the bottom of the document to the top of the screen");
break;
+ case RC_MAC_DONTSWAP_CTRL_META:
+ str = _("Make Apple key act as Meta and Control key as Ctrl.");
+ break;
+
case RC_MAC_LIKE_WORD_MOVEMENT:
str = _("Use the Mac OS X conventions for the word-level cursor movement");
break;
case RC_USETEMPDIR:
break;
+ case RC_USE_USE_SYSTEM_COLORS:
+ str = _("Enable use the system colors for some things like main window background and selection.");
+ break;
+
case RC_USE_TOOLTIP:
str = _("Enable the automatic appearance of tool tips in the work area.");
break;