#include "Converter.h"
#include "FontEnums.h"
#include "Format.h"
+#include "FuncCode.h"
+#include "FuncRequest.h"
#include "Lexer.h"
#include "LyX.h"
#include "Mover.h"
// 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 = 27; // spitz: add flavor value to needaux flag
+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 },
{ "\\use_converter_needauth_forbidden", LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN },
{ "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
{ "\\use_native_filedialog", LyXRC::RC_USE_NATIVE_FILEDIALOG },
- { "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
// 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 },
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());
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_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_PARAGRAPH_MARKERS:
case LyXRC::RC_PATH_PREFIX:
if (lyxrc_orig.path_prefix != lyxrc_new.path_prefix) {
- prependEnvPath("PATH", lyxrc_new.path_prefix);
+ prependEnvPath("PATH", replaceEnvironmentPath(lyxrc_new.path_prefix));
// Resets python path
support::os::python(true);
}
// fall through
case LyXRC::RC_PREVIEW:
+ if (lyxrc_orig.preview != lyxrc_new.preview) {
+ // Update all previews of all documents.
+ /* FIXME: this can be very expensive. It would be cheaper
+ * to kill all existing previews and update visible
+ * previews.*/
+ theBufferList().updatePreviews();
+ }
+ // fall through
case LyXRC::RC_PREVIEW_HASHED_LABELS:
case LyXRC::RC_PREVIEW_SCALE_FACTOR:
case LyXRC::RC_PRINTLANDSCAPEFLAG:
case LyXRC::RC_SAVE_COMPRESSED:
case LyXRC::RC_SAVE_ORIGIN:
case LyXRC::RC_SCREEN_DPI:
+
case LyXRC::RC_SCREEN_FONT_ROMAN:
case LyXRC::RC_SCREEN_FONT_ROMAN_FOUNDRY:
case LyXRC::RC_SCREEN_FONT_SANS:
case LyXRC::RC_SCREEN_FONT_SIZES:
case LyXRC::RC_SCREEN_FONT_TYPEWRITER:
case LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY:
- case LyXRC::RC_GEOMETRY_SESSION:
case LyXRC::RC_SCREEN_ZOOM:
+ if (lyxrc_orig.roman_font_name != lyxrc_new.roman_font_name
+ || lyxrc_orig.sans_font_name != lyxrc_new.sans_font_name
+ || lyxrc_orig.typewriter_font_name != lyxrc_new.typewriter_font_name
+ || lyxrc_orig.roman_font_foundry != lyxrc_new.roman_font_foundry
+ || lyxrc_orig.sans_font_foundry != lyxrc_new.sans_font_foundry
+ || lyxrc_orig.use_scalable_fonts != lyxrc_new.use_scalable_fonts
+ || lyxrc_orig.font_sizes != lyxrc_new.font_sizes
+ || lyxrc_orig.typewriter_font_foundry != lyxrc_new.typewriter_font_foundry
+ || lyxrc_orig.defaultZoom != lyxrc_new.defaultZoom) {
+ dispatch(FuncRequest(LFUN_SCREEN_FONT_UPDATE));
+ }
+ // fall through
+ case LyXRC::RC_GEOMETRY_SESSION:
case LyXRC::RC_SERVERPIPE:
case LyXRC::RC_SET_COLOR:
case LyXRC::RC_SHOW_BANNER:
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:
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 = _("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;