#include "LyX.h"
#include "Mover.h"
#include "Session.h"
+#include "SpellChecker.h"
#include "version.h"
#include "graphics/GraphicsTypes.h"
if (tag != RC_LAST)
break;
case RC_TEX_EXPECTS_WINDOWS_PATHS:
- if (ignore_system_lyxrc ||
- windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
+ // Don't write this setting to the preferences file,
+ // but allow temporary changes (bug 7557).
+ if (ignore_system_lyxrc) {
os << "\\tex_expects_windows_paths "
<< convert<string>(windows_style_tex_paths) << '\n';
}
// if we forget an element.
LyXRC::LyXRCTags tag = LyXRC::RC_LAST;
switch (tag) {
+ case LyXRC::RC_LAST:
case LyXRC::RC_ACCEPT_COMPOUND:
+ if (lyxrc_orig.spellchecker_accept_compound != lyxrc_new.spellchecker_accept_compound)
+ if (theSpellChecker()) theSpellChecker()->advanceChangeNumber();
case LyXRC::RC_ALT_LANG:
case LyXRC::RC_PLAINTEXT_LINELEN:
case LyXRC::RC_AUTOCORRECTION_MATH:
case LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN:
case LyXRC::RC_DISPLAY_GRAPHICS:
case LyXRC::RC_DOCUMENTPATH:
+ if (lyxrc_orig.document_path != lyxrc_new.document_path) {
+ FileName path(lyxrc_new.document_path);
+ if (path.exists() && path.isDirectory())
+ package().document_dir() = FileName(lyxrc.document_path);
+ }
case LyXRC::RC_EDITOR_ALTERNATIVES:
case LyXRC::RC_ESC_CHARS:
case LyXRC::RC_EXAMPLEPATH:
case LyXRC::RC_NUMLASTFILES:
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);
+ }
case LyXRC::RC_PREVIEW:
case LyXRC::RC_PREVIEW_HASHED_LABELS:
case LyXRC::RC_PREVIEW_SCALE_FACTOR:
case LyXRC::RC_SHOW_BANNER:
case LyXRC::RC_OPEN_BUFFERS_IN_TABS:
case LyXRC::RC_SPELLCHECKER:
+ if (lyxrc_orig.spellchecker != lyxrc_new.spellchecker)
+ setSpellChecker();
case LyXRC::RC_SPELLCHECK_CONTINUOUSLY:
case LyXRC::RC_SPELLCHECK_NOTES:
case LyXRC::RC_SPLITINDEX_COMMAND:
case LyXRC::RC_TEMPLATEPATH:
case LyXRC::RC_TEX_ALLOWS_SPACES:
case LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS:
+ if (lyxrc_orig.windows_style_tex_paths != lyxrc_new.windows_style_tex_paths) {
+ os::windows_style_tex_paths(lyxrc_new.windows_style_tex_paths);
+ }
case LyXRC::RC_TEXINPUTS_PREFIX:
case LyXRC::RC_THESAURUSDIRPATH:
case LyXRC::RC_UIFILE:
case LyXRC::RC_DEFAULT_DECIMAL_POINT:
case LyXRC::RC_SCROLL_WHEEL_ZOOM:
case LyXRC::RC_CURSOR_WIDTH:
- case LyXRC::RC_LAST:
break;
}
-
- // Do what is needed (if any) for changes to actually take effect.
- if (lyxrc_orig.document_path != lyxrc_new.document_path) {
- FileName path(lyxrc_new.document_path);
- if (path.exists() && path.isDirectory())
- package().document_dir() = FileName(lyxrc.document_path);
- }
- if (lyxrc_orig.path_prefix != lyxrc_new.path_prefix) {
- prependEnvPath("PATH", lyxrc_new.path_prefix);
- }
- if (lyxrc_orig.windows_style_tex_paths != lyxrc_new.windows_style_tex_paths) {
- os::windows_style_tex_paths(lyxrc_new.windows_style_tex_paths);
- }
}