// 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 = 25; // lasgouttes: remove qimage
-
+static unsigned int const LYXRC_FILEFORMAT = 29; // spitz: remove \\date_insert_format
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
{ "\\copier", LyXRC::RC_COPIER },
{ "\\cursor_follows_scrollbar", LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR },
{ "\\cursor_width", LyXRC::RC_CURSOR_WIDTH },
- { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT },
{ "\\def_file", LyXRC::RC_DEFFILE },
{ "\\default_decimal_point", LyXRC::RC_DEFAULT_DECIMAL_POINT },
{ "\\default_length_unit", LyXRC::RC_DEFAULT_LENGTH_UNIT },
{ "\\escape_chars", LyXRC::RC_ESC_CHARS },
{ "\\example_path", LyXRC::RC_EXAMPLEPATH },
{ "\\export_overwrite", LyXRC::RC_EXPORT_OVERWRITE },
- { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
{ "\\format", LyXRC::RC_FILEFORMAT },
{ "\\forward_search_dvi", LyXRC::RC_FORWARD_SEARCH_DVI },
{ "\\forward_search_pdf", LyXRC::RC_FORWARD_SEARCH_PDF },
{ "\\use_converter_needauth", LyXRC::RC_USE_CONVERTER_NEEDAUTH },
{ "\\use_converter_needauth_forbidden", LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN },
{ "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
- { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
+ { "\\use_native_filedialog", LyXRC::RC_USE_NATIVE_FILEDIALOG },
// compatibility with versions older than 1.4.0 only
{ "\\use_system_colors", LyXRC::RC_USE_SYSTEM_COLORS },
{ "\\use_system_theme_icons", LyXRC::RC_USE_SYSTEM_THEME_ICONS },
default_platex_view_format = "pdf3";
chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
bibtex_command = "automatic";
- fontenc = "default";
index_command = "makeindex -c -q";
nomencl_command = "makeindex -s nomencl.ist";
pygmentize_command = string();
num_lastfiles = 20;
check_lastfiles = true;
use_lastfilepos = true;
+ use_native_filedialog = true;
load_session = false;
make_backup = true;
save_compressed = false;
// 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)
show_banner = true;
windows_style_tex_paths = false;
tex_allows_spaces = false;
- date_insert_format = "%x";
cursor_follows_scrollbar = false;
scroll_below_document = false;
scroll_wheel_zoom = SCROLL_WHEEL_ZOOM_CTRL;
use_converter_needauth = true;
use_system_colors = false;
use_tooltip = true;
- use_pixmap_cache = false;
converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
user_name = to_utf8(support::user_name());
user_email = to_utf8(support::user_email());
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;
}
}
break;
- case RC_FONT_ENCODING:
- lexrc >> fontenc;
- break;
-
case RC_PRINTLANDSCAPEFLAG:
lexrc >> print_landscape_flag;
break;
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;
case RC_USE_TOOLTIP:
lexrc >> use_tooltip;
break;
- case RC_USE_PIXMAP_CACHE:
- lexrc >> use_pixmap_cache;
- break;
case RC_SPELLCHECKER:
lexrc >> spellchecker;
break;
if (lexrc.next())
default_length_unit = (Length::UNIT) lexrc.getInteger();
break;
- case RC_DATE_INSERT_FORMAT:
- lexrc >> date_insert_format;
- break;
case RC_LANGUAGE_CUSTOM_PACKAGE:
lexrc >> language_custom_package;
break;
if (tag != RC_LAST)
break;
// fall through
- case RC_DATE_INSERT_FORMAT:
- if (ignore_system_lyxrc ||
- date_insert_format != system_lyxrc.date_insert_format) {
- os << "\\date_insert_format \"" << date_insert_format
- << "\"\n";
- }
- if (tag != RC_LAST)
- break;
- // fall through
case RC_USER_NAME:
os << "\\user_name \"" << user_name << "\"\n";
if (tag != RC_LAST)
if (tag != RC_LAST)
break;
// fall through
- case RC_FONT_ENCODING:
- if (ignore_system_lyxrc ||
- fontenc != system_lyxrc.fontenc) {
- os << "\\font_encoding \"" << fontenc << "\"\n";
- }
- if (tag != RC_LAST)
- break;
-
os << "\n#\n"
<< "# FILE SECTION ######################################\n"
<< "#\n\n";
-
// fall through
case RC_DOCUMENTPATH:
if (ignore_system_lyxrc ||
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<string>(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) {
if (tag != RC_LAST)
break;
// fall through
- case RC_USE_PIXMAP_CACHE:
- if (ignore_system_lyxrc ||
- use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
- os << "\\use_pixmap_cache "
- << convert<string>(use_pixmap_cache)
- << '\n';
- }
- if (tag != RC_LAST)
- break;
- // fall through
os << "\n#\n"
<< "# LANGUAGE SUPPORT SECTION ##########################\n"
case LyXRC::RC_COPIER:
case LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR:
case LyXRC::RC_SCROLL_BELOW_DOCUMENT:
- 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_EDITOR_ALTERNATIVES:
case LyXRC::RC_ESC_CHARS:
case LyXRC::RC_EXAMPLEPATH:
- case LyXRC::RC_FONT_ENCODING:
case LyXRC::RC_FILEFORMAT:
case LyXRC::RC_GROUP_LAYOUTS:
case LyXRC::RC_HUNSPELLDIR_PATH:
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:
case LyXRC::RC_USE_SYSTEM_THEME_ICONS:
case LyXRC::RC_VIEWDVI_PAPEROPTION:
case LyXRC::RC_SINGLE_CLOSE_TAB_BUTTON:
}
+set<string> LyXRC::getRCs()
+{
+ set<string> res;
+ for (int i = 0; i != lyxrcCount; ++i)
+ res.insert(ltrim(lyxrcTags[i].tag, "\\"));
+ return res;
+}
+
+
#if 0
string const LyXRC::getDescription(LyXRCTags tag)
{
str = _("Show a small box around a Math Macro with the macro name when the cursor is inside.");
break;
- case RC_DATE_INSERT_FORMAT:
- //xgettext:no-c-format
- str = _("This accepts the normal strftime formats; see man strftime for full details. E.g.\"%A, %e. %B %Y\".");
- break;
-
case RC_DEFFILE:
str = _("Command definition file. Can either specify an absolute path, or LyX will look in its global and local commands/ directories.");
break;
str = _("The path that LyX will set when offering to choose an example. An empty value selects the directory LyX was started from.");
break;
- case RC_FONT_ENCODING:
- str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
- break;
-
case RC_FILEFORMAT:
break;
str = _("Enable the automatic appearance of tool tips in the work area.");
break;
- case RC_USE_PIXMAP_CACHE:
- str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
- break;
-
case RC_VIEWDVI_PAPEROPTION:
_("Specify the paper command to DVI viewer (leave empty or use \"-paper\")");
break;