]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
Change string
[lyx.git] / src / LyXRC.cpp
index c8f03cb911c1d259b35637153d6e11d6d3260086..92c95b0d1e5736981178ae0947990edd840e507f 100644 (file)
@@ -63,14 +63,15 @@ keyword_item lyxrcTags[] = {
        { "\\bind_file", LyXRC::RC_BINDFILE },
        { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
        { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
+       { "\\completion_cursor_text", LyXRC::RC_COMPLETION_CURSOR_TEXT },
        { "\\completion_inline_delay", LyXRC::RC_COMPLETION_INLINE_DELAY },
+       { "\\completion_inline_dots", LyXRC::RC_COMPLETION_INLINE_DOTS },
        { "\\completion_inline_math", LyXRC::RC_COMPLETION_INLINE_MATH },
        { "\\completion_inline_text", LyXRC::RC_COMPLETION_INLINE_TEXT },
-       { "\\completion_inline_dots", LyXRC::RC_COMPLETION_INLINE_DOTS },
+       { "\\completion_popup_after_complete", LyXRC::RC_COMPLETION_POPUP_AFTER_COMPLETE },
        { "\\completion_popup_delay", LyXRC::RC_COMPLETION_POPUP_DELAY },
        { "\\completion_popup_math", LyXRC::RC_COMPLETION_POPUP_MATH },
        { "\\completion_popup_text", LyXRC::RC_COMPLETION_POPUP_TEXT },
-       { "\\completion_popup_after_complete", LyXRC::RC_COMPLETION_POPUP_AFTER_COMPLETE },
        { "\\converter", LyXRC::RC_CONVERTER },
        { "\\converter_cache_maxage", LyXRC::RC_CONVERTER_CACHE_MAXAGE },
        { "\\copier", LyXRC::RC_COPIER },
@@ -93,6 +94,7 @@ keyword_item lyxrcTags[] = {
        { "\\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 },
        { "\\index_command", LyXRC::RC_INDEX_COMMAND },
        { "\\input", LyXRC::RC_INPUT },
        { "\\kbmap", LyXRC::RC_KBMAP },
@@ -113,6 +115,7 @@ keyword_item lyxrcTags[] = {
        { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
        { "\\mouse_wheel_speed", LyXRC::RC_MOUSE_WHEEL_SPEED },
        { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
+       { "\\open_buffers_in_tabs", LyXRC::RC_OPEN_BUFFERS_IN_TABS },
        { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
        { "\\personal_dictionary", LyXRC::RC_PERS_DICT },
        { "\\plaintext_linelen", LyXRC::RC_PLAINTEXT_LINELEN },
@@ -160,6 +163,7 @@ keyword_item lyxrcTags[] = {
        { "\\tex_expects_windows_paths", LyXRC::RC_TEX_EXPECTS_WINDOWS_PATHS },
        { "\\ui_file", LyXRC::RC_UIFILE },
        { "\\use_alt_language", LyXRC::RC_USE_ALT_LANG },
+       { "\\use_bundled_format", LyXRC::RC_USE_BUNDLED_FORMAT },
        { "\\use_converter_cache", LyXRC::RC_USE_CONVERTER_CACHE },
        { "\\use_escape_chars", LyXRC::RC_USE_ESC_CHARS },
        { "\\use_input_encoding", LyXRC::RC_USE_INP_ENC },
@@ -272,6 +276,7 @@ void LyXRC::setDefaults() {
        language_command_begin = "\\selectlanguage{$$lang}";
        language_command_local = "\\foreignlanguage{$$lang}{";
        sort_layouts = false;
+       group_layouts = true;
        default_language = "english";
        show_banner = true;
        windows_style_tex_paths = false;
@@ -290,6 +295,12 @@ void LyXRC::setDefaults() {
        converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
        user_name = to_utf8(support::user_name());
        user_email = to_utf8(support::user_email());
+#ifdef __APPLE_CC__
+       open_buffers_in_tabs = false;
+#else
+       open_buffers_in_tabs = true;
+#endif
+       use_bundled_format = false;
 
        // Fullscreen settings
        full_screen_limit = false;
@@ -298,6 +309,7 @@ void LyXRC::setDefaults() {
        full_screen_scrollbar = true;
        full_screen_width = 700;
 
+       completion_cursor_text = true;
        completion_popup_math = true;
        completion_popup_text = false;
        completion_popup_delay = 2.0;
@@ -813,6 +825,12 @@ int LyXRC::read(Lexer & lexrc)
                        }
                        break;
 
+               case RC_COMPLETION_CURSOR_TEXT:
+                       if (lexrc.next()) {
+                               completion_cursor_text = lexrc.getBool();
+                       }
+                       break;
+
                case RC_COMPLETION_POPUP_AFTER_COMPLETE:
                        if (lexrc.next()) {
                                completion_popup_after_complete = lexrc.getBool();
@@ -1270,6 +1288,10 @@ int LyXRC::read(Lexer & lexrc)
                        if (lexrc.next())
                                sort_layouts = lexrc.getBool();
                        break;
+               case RC_GROUP_LAYOUTS:
+                       if (lexrc.next())
+                               group_layouts = lexrc.getBool();
+                       break;
                case RC_FULL_SCREEN_LIMIT:
                        if (lexrc.next())
                                full_screen_limit = lexrc.getBool();
@@ -1290,6 +1312,14 @@ int LyXRC::read(Lexer & lexrc)
                        if (lexrc.next())
                                full_screen_width = lexrc.getInteger();
                        break;
+               case RC_OPEN_BUFFERS_IN_TABS:
+                       if (lexrc.next())
+                               open_buffers_in_tabs = lexrc.getBool();
+                               break;
+               case RC_USE_BUNDLED_FORMAT:
+                       if (lexrc.next())
+                               use_bundled_format = lexrc.getBool();
+                               break;
 
                case RC_LAST: break; // this is just a dummy
                }
@@ -1461,6 +1491,14 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_GROUP_LAYOUTS:
+               if (ignore_system_lyxrc ||
+                   group_layouts != system_lyxrc.group_layouts) {
+                       os << "# Group layouts by their category.\n"
+                          << "\\group_layouts " << convert<string>(group_layouts) << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_VIEWDVI_PAPEROPTION:
                if (ignore_system_lyxrc ||
                    view_dvi_paper_option
@@ -1860,7 +1898,24 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
-
+       case RC_OPEN_BUFFERS_IN_TABS:
+               if (ignore_system_lyxrc ||
+                   open_buffers_in_tabs != system_lyxrc.open_buffers_in_tabs) {
+                       os << "\\open_buffers_in_tabs "
+                          << convert<string>(open_buffers_in_tabs)
+                          << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
+       case RC_USE_BUNDLED_FORMAT:
+               if (ignore_system_lyxrc ||
+                   use_bundled_format != system_lyxrc.use_bundled_format) {
+                       os << "\\use_bundled_format "
+                          << convert<string>(use_bundled_format)
+                          << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
 
                os << "\n#\n"
                   << "# COLOR SECTION ###################################\n"
@@ -2159,6 +2214,14 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_COMPLETION_CURSOR_TEXT:
+               if (ignore_system_lyxrc ||
+                   completion_cursor_text != system_lyxrc.completion_cursor_text) {
+                       os << "\\completion_cursor_text "
+                          << convert<string>(completion_cursor_text) << '\n';
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_COMPLETION_POPUP_AFTER_COMPLETE:
                if (ignore_system_lyxrc ||
                    completion_popup_after_complete
@@ -2784,6 +2847,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("Show the completion popup without delay after non-unique completion attempt.");
                break;
 
+       case RC_COMPLETION_POPUP_TEXT:
+               str = _("Show a small triangle on the cursor to indicate that a completion is available.");
+               break;
+
        case RC_COMPLETION_POPUP_DELAY:
                str = _("The inline completion delay.");
                break;