#include "Format.h"
#include "FuncCode.h"
#include "FuncRequest.h"
-#include "Lexer.h"
#include "LyX.h"
#include "Mover.h"
#include "SpellChecker.h"
#include "support/environment.h"
#include "support/FileName.h"
#include "support/filetools.h"
+#include "support/Lexer.h"
#include "support/lstrings.h"
#include "support/os.h"
#include "support/Package.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 = 36; // rkh: spellcheck_continuously default
+static unsigned int const LYXRC_FILEFORMAT = 38; // chillenb: screen_width and screen_limit
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
{ "\\format", LyXRC::RC_FILEFORMAT },
{ "\\forward_search_dvi", LyXRC::RC_FORWARD_SEARCH_DVI },
{ "\\forward_search_pdf", LyXRC::RC_FORWARD_SEARCH_PDF },
- { "\\fullscreen_limit", LyXRC::RC_FULL_SCREEN_LIMIT },
{ "\\fullscreen_menubar", LyXRC::RC_FULL_SCREEN_MENUBAR },
{ "\\fullscreen_scrollbar", LyXRC::RC_FULL_SCREEN_SCROLLBAR },
{ "\\fullscreen_statusbar", LyXRC::RC_FULL_SCREEN_STATUSBAR },
{ "\\fullscreen_tabbar", LyXRC::RC_FULL_SCREEN_TABBAR },
{ "\\fullscreen_toolbars", LyXRC::RC_FULL_SCREEN_TOOLBARS },
- { "\\fullscreen_width", LyXRC::RC_FULL_SCREEN_WIDTH },
{ "\\group_layouts", LyXRC::RC_GROUP_LAYOUTS },
{ "\\gui_language", LyXRC::RC_GUI_LANGUAGE },
{ "\\hunspelldir_path", LyXRC::RC_HUNSPELLDIR_PATH },
{ "\\screen_font_sizes", LyXRC::RC_SCREEN_FONT_SIZES },
{ "\\screen_font_typewriter", LyXRC::RC_SCREEN_FONT_TYPEWRITER },
{ "\\screen_font_typewriter_foundry", LyXRC::RC_SCREEN_FONT_TYPEWRITER_FOUNDRY },
+ { "\\screen_limit", LyXRC::RC_SCREEN_LIMIT },
+ { "\\screen_width", LyXRC::RC_SCREEN_WIDTH },
{ "\\screen_zoom", LyXRC::RC_SCREEN_ZOOM },
{ "\\scroll_below_document", LyXRC::RC_SCROLL_BELOW_DOCUMENT },
{ "\\scroll_wheel_zoom", LyXRC::RC_SCROLL_WHEEL_ZOOM },
{ "\\texinputs_prefix", LyXRC::RC_TEXINPUTS_PREFIX },
{ "\\thesaurusdir_path", LyXRC::RC_THESAURUSDIRPATH },
{ "\\ui_file", LyXRC::RC_UIFILE },
+ { "\\ui_style", LyXRC::RC_UI_STYLE },
{ "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
{ "\\use_converter_needauth", LyXRC::RC_USE_CONVERTER_NEEDAUTH },
{ "\\use_converter_needauth_forbidden", LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN },
lexrc >> icon_set;
break;
+ case RC_UI_STYLE:
+ lexrc >> ui_style;
+ break;
+
case RC_USE_SYSTEM_THEME_ICONS:
lexrc >> use_system_theme_icons;
break;
case RC_GROUP_LAYOUTS:
lexrc >> group_layouts;
break;
- case RC_FULL_SCREEN_LIMIT:
- lexrc >> full_screen_limit;
+ case RC_SCREEN_LIMIT:
+ lexrc >> screen_limit;
break;
case RC_FULL_SCREEN_TOOLBARS:
lexrc >> full_screen_toolbars;
case RC_FULL_SCREEN_MENUBAR:
lexrc >> full_screen_menubar;
break;
- case RC_FULL_SCREEN_WIDTH:
- lexrc >> full_screen_width;
+ case RC_SCREEN_WIDTH:
+ lexrc >> screen_width;
break;
case RC_OPEN_BUFFERS_IN_TABS:
lexrc >> open_buffers_in_tabs;
draw_strategy = DS_PARTIAL;
else if (tmp == "backingstore")
draw_strategy = DS_BACKINGSTORE;
+ else if (tmp == "full")
+ draw_strategy = DS_FULL;
else {
- draw_strategy = DS_PARTIAL;
LYXERR0("Unrecognized draw strategy " << tmp <<'"');
}
}
if (tag != RC_LAST)
break;
// fall through
+ case RC_UI_STYLE:
+ if (ignore_system_lyxrc ||
+ ui_style != system_lyxrc.ui_style) {
+ os << "\\ui_style \"" << ui_style
+ << "\"\n";
+ }
+ if (tag != RC_LAST)
+ break;
+ // fall through
case RC_USE_SYSTEM_THEME_ICONS:
if (ignore_system_lyxrc ||
use_system_theme_icons != system_lyxrc.use_system_theme_icons) {
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"
+ os << "# Set to true to use script to search"
+ << " local disk for citation targets.\n"
<< "\\citation_search "
<< convert<string>(citation_search)
<< '\n';
if (tag != RC_LAST)
break;
// fall through
- case RC_FULL_SCREEN_LIMIT:
+ case RC_SCREEN_LIMIT:
if (ignore_system_lyxrc ||
- full_screen_limit != system_lyxrc.full_screen_limit) {
- os << "\\fullscreen_limit "
- << convert<string>(full_screen_limit)
+ screen_limit != system_lyxrc.screen_limit) {
+ os << "\\screen_limit "
+ << convert<string>(screen_limit)
<< '\n';
}
if (tag != RC_LAST)
if (tag != RC_LAST)
break;
// fall through
- case RC_FULL_SCREEN_WIDTH:
+ case RC_SCREEN_WIDTH:
if (ignore_system_lyxrc ||
- full_screen_width != system_lyxrc.full_screen_width) {
- os << "\\fullscreen_width "
- << convert<string>(full_screen_width)
+ screen_width != system_lyxrc.screen_width) {
+ os << "\\screen_width "
+ << screen_width.asString()
<< '\n';
}
if (tag != RC_LAST)
draw_strategy != system_lyxrc.draw_strategy) {
string status;
switch (draw_strategy) {
+ case DS_FULL:
+ status = "full";
+ break;
case DS_PARTIAL:
status = "partial";
break;
case LyXRC::RC_GROUP_LAYOUTS:
case LyXRC::RC_HUNSPELLDIR_PATH:
case LyXRC::RC_ICON_SET:
+ case LyXRC::RC_UI_STYLE:
case LyXRC::RC_INDEX_ALTERNATIVES:
case LyXRC::RC_INDEX_COMMAND:
case LyXRC::RC_JBIBTEX_COMMAND:
case LyXRC::RC_SINGLE_CLOSE_TAB_BUTTON:
case LyXRC::RC_SINGLE_INSTANCE:
case LyXRC::RC_SORT_LAYOUTS:
- case LyXRC::RC_FULL_SCREEN_LIMIT:
+ case LyXRC::RC_SCREEN_LIMIT:
case LyXRC::RC_FULL_SCREEN_SCROLLBAR:
case LyXRC::RC_FULL_SCREEN_MENUBAR:
case LyXRC::RC_FULL_SCREEN_STATUSBAR:
case LyXRC::RC_FULL_SCREEN_TABBAR:
case LyXRC::RC_FULL_SCREEN_TOOLBARS:
- case LyXRC::RC_FULL_SCREEN_WIDTH:
+ case LyXRC::RC_SCREEN_WIDTH:
case LyXRC::RC_VISUAL_CURSOR:
case LyXRC::RC_CLOSE_BUFFER_WITH_LAST_VIEW:
case LyXRC::RC_VIEWER: