]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
remove indirection from LyXView::viewStatusMessage().
[lyx.git] / src / LyXRC.cpp
index aec66ee8983487fbdea9edf2ed03b84da98ae67a..b9dde4187b386e4c01a1769c4c8eb308f778972c 100644 (file)
@@ -87,6 +87,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN },
        { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
        { "\\document_path", LyXRC::RC_DOCUMENTPATH },
+       { "\\editor_alternatives", LyXRC::RC_EDITOR_ALTERNATIVES },
        { "\\escape_chars", LyXRC::RC_ESC_CHARS },
        { "\\example_path", LyXRC::RC_EXAMPLEPATH },
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
@@ -195,6 +196,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
        // compatibility with versions older than 1.4.0 only
        { "\\viewer", LyXRC::RC_VIEWER},
+       { "\\viewer_alternatives", LyXRC::RC_VIEWER_ALTERNATIVES },
        { "\\visual_cursor" ,LyXRC::RC_VISUAL_CURSOR}
 };
 
@@ -241,7 +243,7 @@ void LyXRC::setDefaults()
        index_command = "makeindex -c -q";
        nomencl_command = "makeindex -s nomencl.ist";
        dpi = 75;
-       // Because a screen typically is wider than a piece of paper:
+       // Because a screen is typically wider than a piece of paper:
        zoom = 150;
        allow_geometry_session = true;
        // Default LaTeX font size:
@@ -304,7 +306,7 @@ void LyXRC::setDefaults()
        label_init_length = 3;
        preview = PREVIEW_OFF;
        preview_hashed_labels  = false;
-       preview_scale_factor = "0.9";
+       preview_scale_factor = 1.0;
        use_converter_cache = true;
        use_tooltip = true;
        use_pixmap_cache = false;
@@ -1032,6 +1034,22 @@ int LyXRC::read(Lexer & lexrc)
                        }
                        break;
                }
+               case RC_VIEWER_ALTERNATIVES:  {
+                       string format, command;
+                       if (lexrc.next())
+                               format = lexrc.getString();
+                       if (lexrc.eatLine())
+                               command = lexrc.getString();
+                       viewer_alternatives.push_back(make_pair(format, command));
+                       break;
+               }
+               case RC_EDITOR_ALTERNATIVES:  {
+                       string format, command;
+                       lexrc >> format >> command;
+                       editor_alternatives.push_back(make_pair(format, command));
+                       break;
+               }
+
                case RC_DEFAULT_VIEW_FORMAT:
                        lexrc >> default_view_format;
                        break;
@@ -2459,6 +2477,26 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                                   << "\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
                if (tag != RC_LAST)
                        break;
+       case RC_VIEWER_ALTERNATIVES:
+               if (ignore_system_lyxrc ||
+                   viewer_alternatives != system_lyxrc.viewer_alternatives) {
+                       for (vector<pair<string, string> >::const_iterator it = viewer_alternatives.begin();
+                            it != viewer_alternatives.end(); ++it)
+                       os << "\\viewer_alternatives "
+                          << it->first << " " << it->second << "\n";
+               }
+               if (tag != RC_LAST)
+                       break;
+       case RC_EDITOR_ALTERNATIVES:
+               if (ignore_system_lyxrc ||
+                   editor_alternatives != system_lyxrc.editor_alternatives) {
+                       for (vector<pair<string, string> >::const_iterator it = editor_alternatives.begin();
+                            it != editor_alternatives.end(); ++it)
+                       os << "\\editor_alternatives "
+                          << it->first << " " << it->second << "\n";
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_DEFAULT_VIEW_FORMAT:
                if (ignore_system_lyxrc ||
                    default_view_format != system_lyxrc.default_view_format) {